From ee182a25149b8042107c15ffa16d73de2a3c2fd9 Mon Sep 17 00:00:00 2001 From: FranGuam Date: Mon, 18 Mar 2024 15:55:03 +0800 Subject: [PATCH] fix(user_id): delete team_leader from contest_team & set team_leader_uuid as not-null --- metadata/tables.yaml | 6 ------ .../down.sql | 1 + .../up.sql | 1 + .../down.sql | 3 +++ .../up.sql | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/down.sql create mode 100644 migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/up.sql create mode 100644 migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/down.sql create mode 100644 migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/up.sql diff --git a/metadata/tables.yaml b/metadata/tables.yaml index 5eb08bb..89809d0 100644 --- a/metadata/tables.yaml +++ b/metadata/tables.yaml @@ -574,7 +574,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at @@ -589,7 +588,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at @@ -608,7 +606,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at @@ -627,7 +624,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at @@ -646,7 +642,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at @@ -661,7 +656,6 @@ - submitted_code_num - team_id - team_intro - - team_leader - team_leader_uuid - team_name - updated_at diff --git a/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/down.sql b/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/down.sql new file mode 100644 index 0000000..3213051 --- /dev/null +++ b/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/down.sql @@ -0,0 +1 @@ +alter table "public"."contest_team" alter column "team_leader_uuid" drop not null; diff --git a/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/up.sql b/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/up.sql new file mode 100644 index 0000000..78692a1 --- /dev/null +++ b/migrations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/up.sql @@ -0,0 +1 @@ +alter table "public"."contest_team" alter column "team_leader_uuid" set not null; diff --git a/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/down.sql b/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/down.sql new file mode 100644 index 0000000..71b44d5 --- /dev/null +++ b/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."contest_team"."team_leader" is E'比赛队伍'; +alter table "public"."contest_team" alter column "team_leader" drop not null; +alter table "public"."contest_team" add column "team_leader" text; diff --git a/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/up.sql b/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/up.sql new file mode 100644 index 0000000..526e53c --- /dev/null +++ b/migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/up.sql @@ -0,0 +1 @@ +alter table "public"."contest_team" drop column "team_leader" cascade;