From 837980d80237d020c4286a7a4b5c1be2bb6f5d74 Mon Sep 17 00:00:00 2001 From: zzdhyb <139191187+zzdhybthu@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:43:49 +0800 Subject: [PATCH] feat: add honor application year (#190) --- metadata/tables.yaml | 5 +++++ .../down.sql | 4 ++++ .../up.sql | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 migrations/1725960994200_alter_table_public_honor_application_add_column_year/down.sql create mode 100644 migrations/1725960994200_alter_table_public_honor_application_add_column_year/up.sql diff --git a/metadata/tables.yaml b/metadata/tables.yaml index 61b0b74..a8aac24 100644 --- a/metadata/tables.yaml +++ b/metadata/tables.yaml @@ -2965,6 +2965,7 @@ - statement - status - student_uuid + - year select_permissions: - role: counselor permission: @@ -2977,6 +2978,7 @@ - status - student_uuid - updated_at + - year filter: {} - role: student permission: @@ -2989,6 +2991,7 @@ - status - student_uuid - updated_at + - year filter: student_uuid: _eq: X-Hasura-User-Id @@ -2997,6 +3000,7 @@ permission: columns: - status + - year filter: {} check: {} - role: student @@ -3007,6 +3011,7 @@ - statement - status - student_uuid + - year filter: _and: - student_uuid: diff --git a/migrations/1725960994200_alter_table_public_honor_application_add_column_year/down.sql b/migrations/1725960994200_alter_table_public_honor_application_add_column_year/down.sql new file mode 100644 index 0000000..1ae6379 --- /dev/null +++ b/migrations/1725960994200_alter_table_public_honor_application_add_column_year/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."honor_application" add column "year" integer +-- not null default '2023'; diff --git a/migrations/1725960994200_alter_table_public_honor_application_add_column_year/up.sql b/migrations/1725960994200_alter_table_public_honor_application_add_column_year/up.sql new file mode 100644 index 0000000..7c0f6a6 --- /dev/null +++ b/migrations/1725960994200_alter_table_public_honor_application_add_column_year/up.sql @@ -0,0 +1,2 @@ +alter table "public"."honor_application" add column "year" integer + not null default '2023';