Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rearrange mentor application form #185

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 115 additions & 22 deletions metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,43 @@
columns:
- name
filter: {}
- table:
name: freshman
schema: public
insert_permissions:
- role: counselor
permission:
check: {}
columns:
- student_no
- realname
- year
- uuid
select_permissions:
- role: counselor
permission:
columns:
- year
- realname
- student_no
- uuid
filter: {}
allow_aggregations: true
update_permissions:
- role: counselor
permission:
columns:
- year
- realname
- student_no
- uuid
filter: {}
check: {}
delete_permissions:
- role: counselor
permission:
backend_only: false
filter: {}
- table:
name: honor_application
schema: public
Expand Down Expand Up @@ -3085,6 +3122,7 @@
- status
- student_uuid
- updated_at
- year
- role: student
permission:
check:
Expand All @@ -3094,6 +3132,7 @@
- mentor_uuid
- statement
- student_uuid
- year
select_permissions:
- role: counselor
permission:
Expand All @@ -3106,6 +3145,7 @@
- status
- student_uuid
- updated_at
- year
filter: {}
allow_aggregations: true
- role: student
Expand All @@ -3119,6 +3159,7 @@
- status
- student_uuid
- updated_at
- year
filter: {}
allow_aggregations: true
- role: teacher
Expand All @@ -3132,9 +3173,9 @@
- status
- student_uuid
- updated_at
filter:
mentor_uuid:
_eq: X-Hasura-User-Id
- year
filter: {}
allow_aggregations: true
update_permissions:
- role: counselor
permission:
Expand All @@ -3147,6 +3188,7 @@
- status
- student_uuid
- updated_at
- year
filter: {}
check: {}
- role: student
Expand Down Expand Up @@ -3208,13 +3250,15 @@
_eq: X-Hasura-User-Id
columns:
- available
- max_applicant
- mentor_uuid
select_permissions:
- role: counselor
permission:
columns:
- available
- created_at
- max_applicant
- mentor_uuid
- updated_at
filter: {}
Expand All @@ -3223,6 +3267,7 @@
columns:
- available
- created_at
- max_applicant
- mentor_uuid
- updated_at
filter: {}
Expand All @@ -3231,6 +3276,7 @@
columns:
- available
- created_at
- max_applicant
- mentor_uuid
- updated_at
filter:
Expand All @@ -3241,6 +3287,7 @@
permission:
columns:
- available
- max_applicant
filter:
mentor_uuid:
_eq: X-Hasura-User-Id
Expand All @@ -3259,82 +3306,98 @@
permission:
check: {}
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- created_at
- field
- intro
- mentor_uuid
- updated_at
- role: teacher
permission:
check:
mentor_uuid:
_eq: X-Hasura-User-Id
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- created_at
- field
- intro
- mentor_uuid
- updated_at
select_permissions:
- role: counselor
permission:
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- created_at
- field
- intro
- mentor_uuid
- updated_at
filter: {}
allow_aggregations: true
- role: student
permission:
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- field
- intro
- mentor_uuid
filter: {}
allow_aggregations: true
- role: teacher
permission:
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- created_at
- field
- intro
- mentor_uuid
- updated_at
filter:
mentor_uuid:
_eq: X-Hasura-User-Id
filter: {}
allow_aggregations: true
update_permissions:
- role: counselor
permission:
columns:
- available
- max_applicants
- created_at
- updated_at
- mentor_uuid
- achievement
- background
- created_at
- field
- intro
- mentor_uuid
- updated_at
filter: {}
check: {}
- role: teacher
permission:
columns:
- achievement
- available
- background
- created_at
- field
- intro
- max_applicants
- updated_at
filter:
mentor_uuid:
Expand Down Expand Up @@ -3435,6 +3498,36 @@
- start_D
- start_E
filter: {}
- role: student
permission:
columns:
- activateIn
- end_A
- end_B
- end_C
- end_D
- end_E
- start_A
- start_B
- start_C
- start_D
- start_E
filter: {}
- role: teacher
permission:
columns:
- activateIn
- end_A
- end_B
- end_C
- end_D
- end_E
- start_A
- start_B
- start_C
- start_D
- start_E
filter: {}
update_permissions:
- role: counselor
permission:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."mentor_application" add column "year" integer
-- null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."mentor_application" add column "year" integer
null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."mentor_available" add column "max_applicant" integer
-- not null default '1';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."mentor_available" add column "max_applicant" integer
not null default '1';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."mentor_info" add column "available" boolean
-- not null default 'false';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."mentor_info" add column "available" boolean
not null default 'false';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."mentor_info" add column "max_applicants" integer
-- not null default '1';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."mentor_info" add column "max_applicants" integer
not null default '1';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."mentor_application" ALTER COLUMN "year" drop default;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."mentor_application" alter column "year" set default '2023';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."mentor_application" alter column "year" drop not null;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."mentor_application" alter column "year" set not null;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE "public"."freshman";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE "public"."freshman" ("student_no" text NOT NULL, "realname" text NOT NULL, "year" int4 NOT NULL, PRIMARY KEY ("student_no") , UNIQUE ("student_no"));
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."freshman" add column "uuid" uuid
-- null unique;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."freshman" add column "uuid" uuid
null unique;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."mentor_info" alter column "max_applicants" set default '1';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."mentor_info" alter column "max_applicants" set default '5';