-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
大浦 翼
committed
Jun 1, 2023
1 parent
415f69e
commit b3717cb
Showing
20 changed files
with
287 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
table: | ||
name: bureaus | ||
schema: public | ||
array_relationships: | ||
- name: user_details | ||
using: | ||
foreign_key_constraint_on: | ||
column: bureau_id | ||
table: | ||
name: user_details | ||
schema: public |
8 changes: 8 additions & 0 deletions
8
hasura/metadata/databases/default/tables/public_categories.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
table: | ||
name: categories | ||
schema: public | ||
array_relationships: | ||
- name: skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: category_id | ||
table: | ||
name: skills | ||
schema: public |
12 changes: 12 additions & 0 deletions
12
hasura/metadata/databases/default/tables/public_chapters.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
table: | ||
name: chapters | ||
schema: public | ||
object_relationships: | ||
- name: curriculum | ||
using: | ||
foreign_key_constraint_on: curriculum_id | ||
array_relationships: | ||
- name: records | ||
using: | ||
foreign_key_constraint_on: | ||
column: chapter_id | ||
table: | ||
name: records | ||
schema: public |
7 changes: 7 additions & 0 deletions
7
hasura/metadata/databases/default/tables/public_curriculum_skills.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
table: | ||
name: curriculum_skills | ||
schema: public | ||
object_relationships: | ||
- name: curriculum | ||
using: | ||
foreign_key_constraint_on: curriculum_id | ||
- name: skill | ||
using: | ||
foreign_key_constraint_on: skill_id |
19 changes: 19 additions & 0 deletions
19
hasura/metadata/databases/default/tables/public_curriculums.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
table: | ||
name: curriculums | ||
schema: public | ||
object_relationships: | ||
- name: skill | ||
using: | ||
foreign_key_constraint_on: skill_ids | ||
array_relationships: | ||
- name: chapters | ||
using: | ||
foreign_key_constraint_on: | ||
column: curriculum_id | ||
table: | ||
name: chapters | ||
schema: public | ||
- name: curriculum_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: curriculum_id | ||
table: | ||
name: curriculum_skills | ||
schema: public |
8 changes: 8 additions & 0 deletions
8
hasura/metadata/databases/default/tables/public_departments.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
table: | ||
name: departments | ||
schema: public | ||
array_relationships: | ||
- name: user_details | ||
using: | ||
foreign_key_constraint_on: | ||
column: department_id | ||
table: | ||
name: user_details | ||
schema: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
table: | ||
name: grades | ||
schema: public | ||
array_relationships: | ||
- name: user_details | ||
using: | ||
foreign_key_constraint_on: | ||
column: grade_id | ||
table: | ||
name: user_details | ||
schema: public |
7 changes: 7 additions & 0 deletions
7
hasura/metadata/databases/default/tables/public_project_skills.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
table: | ||
name: project_skills | ||
schema: public | ||
object_relationships: | ||
- name: project | ||
using: | ||
foreign_key_constraint_on: project_id | ||
- name: skill | ||
using: | ||
foreign_key_constraint_on: skill_id |
10 changes: 10 additions & 0 deletions
10
hasura/metadata/databases/default/tables/public_project_users.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
table: | ||
name: project_users | ||
schema: public | ||
object_relationships: | ||
- name: project | ||
using: | ||
foreign_key_constraint_on: project_id | ||
- name: role | ||
using: | ||
foreign_key_constraint_on: role_id | ||
- name: user | ||
using: | ||
foreign_key_constraint_on: user_id |
15 changes: 15 additions & 0 deletions
15
hasura/metadata/databases/default/tables/public_projects.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
table: | ||
name: projects | ||
schema: public | ||
array_relationships: | ||
- name: project_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: project_id | ||
table: | ||
name: project_skills | ||
schema: public | ||
- name: project_users | ||
using: | ||
foreign_key_constraint_on: | ||
column: project_id | ||
table: | ||
name: project_users | ||
schema: public |
15 changes: 15 additions & 0 deletions
15
hasura/metadata/databases/default/tables/public_records.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
table: | ||
name: records | ||
schema: public | ||
object_relationships: | ||
- name: chapter | ||
using: | ||
foreign_key_constraint_on: chapter_id | ||
- name: user | ||
using: | ||
foreign_key_constraint_on: user_id | ||
array_relationships: | ||
- name: teachers | ||
using: | ||
foreign_key_constraint_on: | ||
column: record_id | ||
table: | ||
name: teachers | ||
schema: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
table: | ||
name: roles | ||
schema: public | ||
array_relationships: | ||
- name: project_users | ||
using: | ||
foreign_key_constraint_on: | ||
column: role_id | ||
table: | ||
name: project_users | ||
schema: public |
36 changes: 36 additions & 0 deletions
36
hasura/metadata/databases/default/tables/public_skills.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
table: | ||
name: skills | ||
schema: public | ||
object_relationships: | ||
- name: category | ||
using: | ||
foreign_key_constraint_on: category_id | ||
- name: type | ||
using: | ||
foreign_key_constraint_on: type_id | ||
array_relationships: | ||
- name: curriculum_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: skill_id | ||
table: | ||
name: curriculum_skills | ||
schema: public | ||
- name: curriculums | ||
using: | ||
foreign_key_constraint_on: | ||
column: skill_ids | ||
table: | ||
name: curriculums | ||
schema: public | ||
- name: project_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: skill_id | ||
table: | ||
name: project_skills | ||
schema: public | ||
- name: user_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: skill_id | ||
table: | ||
name: user_skills | ||
schema: public |
7 changes: 7 additions & 0 deletions
7
hasura/metadata/databases/default/tables/public_teachers.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
table: | ||
name: teachers | ||
schema: public | ||
object_relationships: | ||
- name: record | ||
using: | ||
foreign_key_constraint_on: record_id | ||
- name: user | ||
using: | ||
foreign_key_constraint_on: user_id |
15 changes: 15 additions & 0 deletions
15
hasura/metadata/databases/default/tables/public_types.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
table: | ||
name: types | ||
schema: public | ||
array_relationships: | ||
- name: skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: type_id | ||
table: | ||
name: skills | ||
schema: public | ||
- name: user_details | ||
using: | ||
foreign_key_constraint_on: | ||
column: type_id | ||
table: | ||
name: user_details | ||
schema: public |
16 changes: 16 additions & 0 deletions
16
hasura/metadata/databases/default/tables/public_user_details.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
table: | ||
name: user_details | ||
schema: public | ||
object_relationships: | ||
- name: bureau | ||
using: | ||
foreign_key_constraint_on: bureau_id | ||
- name: department | ||
using: | ||
foreign_key_constraint_on: department_id | ||
- name: grade | ||
using: | ||
foreign_key_constraint_on: grade_id | ||
- name: type | ||
using: | ||
foreign_key_constraint_on: type_id | ||
- name: user | ||
using: | ||
foreign_key_constraint_on: user_id |
7 changes: 7 additions & 0 deletions
7
hasura/metadata/databases/default/tables/public_user_skills.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
table: | ||
name: user_skills | ||
schema: public | ||
object_relationships: | ||
- name: skill | ||
using: | ||
foreign_key_constraint_on: skill_id | ||
- name: user | ||
using: | ||
foreign_key_constraint_on: user_id |
36 changes: 36 additions & 0 deletions
36
hasura/metadata/databases/default/tables/public_users.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
table: | ||
name: users | ||
schema: public | ||
array_relationships: | ||
- name: project_users | ||
using: | ||
foreign_key_constraint_on: | ||
column: user_id | ||
table: | ||
name: project_users | ||
schema: public | ||
- name: records | ||
using: | ||
foreign_key_constraint_on: | ||
column: user_id | ||
table: | ||
name: records | ||
schema: public | ||
- name: teachers | ||
using: | ||
foreign_key_constraint_on: | ||
column: user_id | ||
table: | ||
name: teachers | ||
schema: public | ||
- name: user_details | ||
using: | ||
foreign_key_constraint_on: | ||
column: user_id | ||
table: | ||
name: user_details | ||
schema: public | ||
- name: user_skills | ||
using: | ||
foreign_key_constraint_on: | ||
column: user_id | ||
table: | ||
name: user_skills | ||
schema: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
ALTER TABLE ONLY public.chapters | ||
ADD CONSTRAINT chapters_curriculum_id_fkey FOREIGN KEY (curriculum_id) REFERENCES public.curriculums(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.curriculum_skills | ||
ADD CONSTRAINT curriculum_skills_curriculum_id_fkey FOREIGN KEY (curriculum_id) REFERENCES public.curriculums(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.curriculum_skills | ||
ADD CONSTRAINT curriculum_skills_skill_id_fkey FOREIGN KEY (skill_id) REFERENCES public.skills(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.curriculums | ||
ADD CONSTRAINT curriculums_skill_ids_fkey FOREIGN KEY (skill_ids) REFERENCES public.skills(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.project_skills | ||
ADD CONSTRAINT project_skills_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.project_skills | ||
ADD CONSTRAINT project_skills_skill_id_fkey FOREIGN KEY (skill_id) REFERENCES public.skills(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.project_users | ||
ADD CONSTRAINT project_users_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.project_users | ||
ADD CONSTRAINT project_users_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.roles(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.project_users | ||
ADD CONSTRAINT project_users_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.records | ||
ADD CONSTRAINT records_chapter_id_fkey FOREIGN KEY (chapter_id) REFERENCES public.chapters(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.records | ||
ADD CONSTRAINT records_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.skills | ||
ADD CONSTRAINT skills_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.categories(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.skills | ||
ADD CONSTRAINT skills_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.types(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.teachers | ||
ADD CONSTRAINT teachers_record_id_fkey FOREIGN KEY (record_id) REFERENCES public.records(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.teachers | ||
ADD CONSTRAINT teachers_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_details | ||
ADD CONSTRAINT user_details_bureau_id_fkey FOREIGN KEY (bureau_id) REFERENCES public.bureaus(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_details | ||
ADD CONSTRAINT user_details_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_details | ||
ADD CONSTRAINT user_details_grade_id_fkey FOREIGN KEY (grade_id) REFERENCES public.grades(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_details | ||
ADD CONSTRAINT user_details_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.types(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_details | ||
ADD CONSTRAINT user_details_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_skills | ||
ADD CONSTRAINT user_skills_skill_id_fkey FOREIGN KEY (skill_id) REFERENCES public.skills(id) ON UPDATE RESTRICT ON DELETE RESTRICT; | ||
ALTER TABLE ONLY public.user_skills | ||
ADD CONSTRAINT user_skills_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE RESTRICT ON DELETE RESTRICT; |