-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from FranGuam/feature/contest-refresh
feat(contest): foreign key, permission and a new table
- Loading branch information
Showing
59 changed files
with
1,054 additions
and
170 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
migrations/1710746043941_rename_table_public_contest_info/down.sql
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 @@ | ||
alter table "public"."contest_notice" rename to "contest_info"; |
1 change: 1 addition & 0 deletions
1
migrations/1710746043941_rename_table_public_contest_info/up.sql
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 @@ | ||
alter table "public"."contest_info" rename to "contest_notice"; |
5 changes: 5 additions & 0 deletions
5
migrations/1710746645445_set_fk_public_contest_manager_contest_id/down.sql
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,5 @@ | ||
alter table "public"."contest_manager" drop constraint "contest_manager_contest_id_fkey", | ||
add constraint "contest_manager_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710746645445_set_fk_public_contest_manager_contest_id/up.sql
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,5 @@ | ||
alter table "public"."contest_manager" drop constraint "contest_manager_contest_id_fkey", | ||
add constraint "contest_manager_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710746660992_set_fk_public_contest_manager_user_uuid/down.sql
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,5 @@ | ||
alter table "public"."contest_manager" drop constraint "contest_manager_user_uuid_fkey", | ||
add constraint "contest_manager_user_uuid_fkey" | ||
foreign key ("user_uuid") | ||
references "public"."users" | ||
("uuid") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710746660992_set_fk_public_contest_manager_user_uuid/up.sql
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,5 @@ | ||
alter table "public"."contest_manager" drop constraint "contest_manager_user_uuid_fkey", | ||
add constraint "contest_manager_user_uuid_fkey" | ||
foreign key ("user_uuid") | ||
references "public"."users" | ||
("uuid") on update restrict on delete cascade; |
3 changes: 3 additions & 0 deletions
3
migrations/1710746937883_alter_table_public_contest_manager_drop_column_user_id/down.sql
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,3 @@ | ||
comment on column "public"."contest_manager"."user_id" is E'比赛管理员映射表'; | ||
alter table "public"."contest_manager" alter column "user_id" drop not null; | ||
alter table "public"."contest_manager" add column "user_id" text; |
1 change: 1 addition & 0 deletions
1
migrations/1710746937883_alter_table_public_contest_manager_drop_column_user_id/up.sql
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 @@ | ||
alter table "public"."contest_manager" drop column "user_id" cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747245302_set_fk_public_contest_notice_contest_id/down.sql
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,5 @@ | ||
alter table "public"."contest_notice" drop constraint "contest_notice_contest_id_fkey", | ||
add constraint "contest_info_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747245302_set_fk_public_contest_notice_contest_id/up.sql
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,5 @@ | ||
alter table "public"."contest_notice" drop constraint "contest_info_contest_id_fkey", | ||
add constraint "contest_notice_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747322343_set_fk_public_contest_room_contest_id/down.sql
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,5 @@ | ||
alter table "public"."contest_room" drop constraint "contest_room_contest_id_fkey", | ||
add constraint "contest_room_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747322343_set_fk_public_contest_room_contest_id/up.sql
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,5 @@ | ||
alter table "public"."contest_room" drop constraint "contest_room_contest_id_fkey", | ||
add constraint "contest_room_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747366589_set_fk_public_contest_room_team_room_id/down.sql
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,5 @@ | ||
alter table "public"."contest_room_team" drop constraint "contest_room_team_room_id_fkey", | ||
add constraint "contest_room_team_room_id_fkey" | ||
foreign key ("room_id") | ||
references "public"."contest_room" | ||
("room_id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747366589_set_fk_public_contest_room_team_room_id/up.sql
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,5 @@ | ||
alter table "public"."contest_room_team" drop constraint "contest_room_team_room_id_fkey", | ||
add constraint "contest_room_team_room_id_fkey" | ||
foreign key ("room_id") | ||
references "public"."contest_room" | ||
("room_id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747374906_set_fk_public_contest_room_team_team_id/down.sql
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,5 @@ | ||
alter table "public"."contest_room_team" drop constraint "contest_room_team_team_id_fkey", | ||
add constraint "contest_room_team_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710747374906_set_fk_public_contest_room_team_team_id/up.sql
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,5 @@ | ||
alter table "public"."contest_room_team" drop constraint "contest_room_team_team_id_fkey", | ||
add constraint "contest_room_team_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update restrict on delete cascade; |
4 changes: 4 additions & 0 deletions
4
migrations/1710747454228_alter_table_public_contest_room_team_add_column_score/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest_room_team" add column "score" integer | ||
-- null; |
2 changes: 2 additions & 0 deletions
2
migrations/1710747454228_alter_table_public_contest_room_team_add_column_score/up.sql
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,2 @@ | ||
alter table "public"."contest_room_team" add column "score" integer | ||
null; |
4 changes: 4 additions & 0 deletions
4
migrations/1710747612861_alter_table_public_contest_room_team_add_column_players/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest_room_team" add column "players" text | ||
-- null; |
2 changes: 2 additions & 0 deletions
2
migrations/1710747612861_alter_table_public_contest_room_team_add_column_players/up.sql
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,2 @@ | ||
alter table "public"."contest_room_team" add column "players" text | ||
null; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748089715_set_fk_public_contest_team_contest_id/down.sql
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,5 @@ | ||
alter table "public"."contest_team" drop constraint "contest_team_contest_id_fkey", | ||
add constraint "contest_team_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748089715_set_fk_public_contest_team_contest_id/up.sql
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,5 @@ | ||
alter table "public"."contest_team" drop constraint "contest_team_contest_id_fkey", | ||
add constraint "contest_team_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748106580_set_fk_public_contest_team_team_leader_uuid/down.sql
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,5 @@ | ||
alter table "public"."contest_team" drop constraint "contest_team_team_leader_uuid_fkey", | ||
add constraint "contest_team_team_leader_uuid_fkey" | ||
foreign key ("team_leader_uuid") | ||
references "public"."users" | ||
("uuid") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748106580_set_fk_public_contest_team_team_leader_uuid/up.sql
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,5 @@ | ||
alter table "public"."contest_team" drop constraint "contest_team_team_leader_uuid_fkey", | ||
add constraint "contest_team_team_leader_uuid_fkey" | ||
foreign key ("team_leader_uuid") | ||
references "public"."users" | ||
("uuid") on update restrict on delete cascade; |
1 change: 1 addition & 0 deletions
1
...ions/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/down.sql
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 @@ | ||
alter table "public"."contest_team" alter column "team_leader_uuid" drop not null; |
1 change: 1 addition & 0 deletions
1
...ations/1710748213008_alter_table_public_contest_team_alter_column_team_leader_uuid/up.sql
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 @@ | ||
alter table "public"."contest_team" alter column "team_leader_uuid" set not null; |
3 changes: 3 additions & 0 deletions
3
migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/down.sql
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,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; |
1 change: 1 addition & 0 deletions
1
migrations/1710748439277_alter_table_public_contest_team_drop_column_team_leader/up.sql
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 @@ | ||
alter table "public"."contest_team" drop column "team_leader" cascade; |
1 change: 1 addition & 0 deletions
1
migrations/1710748524917_alter_table_public_contest_notice_update_comment/down.sql
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 @@ | ||
comment on table "public"."contest_notice" is NULL; |
1 change: 1 addition & 0 deletions
1
migrations/1710748524917_alter_table_public_contest_notice_update_comment/up.sql
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 @@ | ||
comment on table "public"."contest_notice" is E'比赛公告'; |
1 change: 1 addition & 0 deletions
1
...s/1710748636821_alter_table_public_contest_team_code_alter_column_compile_status/down.sql
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 @@ | ||
ALTER TABLE "public"."contest_team_code" ALTER COLUMN "compile_status" drop default; |
1 change: 1 addition & 0 deletions
1
...ons/1710748636821_alter_table_public_contest_team_code_alter_column_compile_status/up.sql
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 @@ | ||
alter table "public"."contest_team_code" alter column "compile_status" set default 'Waiting'; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748785469_set_fk_public_contest_team_member_team_id/down.sql
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,5 @@ | ||
alter table "public"."contest_team_member" drop constraint "contest_team_member_team_id_fkey", | ||
add constraint "contest_team_member_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748785469_set_fk_public_contest_team_member_team_id/up.sql
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,5 @@ | ||
alter table "public"."contest_team_member" drop constraint "contest_team_member_team_id_fkey", | ||
add constraint "contest_team_member_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update restrict on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/down.sql
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,5 @@ | ||
alter table "public"."contest_team_member" drop constraint "contest_team_member_user_uuid_fkey", | ||
add constraint "contest_team_member_user_uuid_fkey" | ||
foreign key ("user_uuid") | ||
references "public"."users" | ||
("uuid") on update cascade on delete cascade; |
5 changes: 5 additions & 0 deletions
5
migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/up.sql
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,5 @@ | ||
alter table "public"."contest_team_member" drop constraint "contest_team_member_user_uuid_fkey", | ||
add constraint "contest_team_member_user_uuid_fkey" | ||
foreign key ("user_uuid") | ||
references "public"."users" | ||
("uuid") on update restrict on delete cascade; |
3 changes: 3 additions & 0 deletions
3
migrations/1710748945639_alter_table_public_contest_team_member_drop_column_user_id/down.sql
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,3 @@ | ||
comment on column "public"."contest_team_member"."user_id" is E'队伍、成员映射表'; | ||
alter table "public"."contest_team_member" alter column "user_id" drop not null; | ||
alter table "public"."contest_team_member" add column "user_id" text; |
1 change: 1 addition & 0 deletions
1
migrations/1710748945639_alter_table_public_contest_team_member_drop_column_user_id/up.sql
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 @@ | ||
alter table "public"."contest_team_member" drop column "user_id" cascade; |
1 change: 1 addition & 0 deletions
1
migrations/1710749697627_create_table_public_contest_player/down.sql
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 @@ | ||
DROP TABLE "public"."contest_player"; |
1 change: 1 addition & 0 deletions
1
migrations/1710749697627_create_table_public_contest_player/up.sql
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 @@ | ||
CREATE TABLE "public"."contest_player" ("contest_id" uuid NOT NULL, "team_label" text NOT NULL, "player_num" integer NOT NULL, "players_label" text NOT NULL, "roles_available" text NOT NULL, PRIMARY KEY ("contest_id","team_label") , FOREIGN KEY ("contest_id") REFERENCES "public"."contest"("id") ON UPDATE restrict ON DELETE cascade);COMMENT ON TABLE "public"."contest_player" IS E'记录每个比赛可以允许几队、每队有几个玩家、每个玩家可以选择哪些角色'; |
4 changes: 4 additions & 0 deletions
4
migrations/1710750734637_alter_table_public_contest_add_column_code_upload_switch/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest" add column "code_upload_switch" boolean | ||
-- not null default 'False'; |
2 changes: 2 additions & 0 deletions
2
migrations/1710750734637_alter_table_public_contest_add_column_code_upload_switch/up.sql
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,2 @@ | ||
alter table "public"."contest" add column "code_upload_switch" boolean | ||
not null default 'False'; |
4 changes: 4 additions & 0 deletions
4
migrations/1710750817344_alter_table_public_contest_add_column_arena_switch/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest" add column "arena_switch" boolean | ||
-- not null default 'False'; |
2 changes: 2 additions & 0 deletions
2
migrations/1710750817344_alter_table_public_contest_add_column_arena_switch/up.sql
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,2 @@ | ||
alter table "public"."contest" add column "arena_switch" boolean | ||
not null default 'False'; |
4 changes: 4 additions & 0 deletions
4
migrations/1710750981395_alter_table_public_contest_add_column_playground_switch/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest" add column "playground_switch" boolean | ||
-- not null default 'False'; |
2 changes: 2 additions & 0 deletions
2
migrations/1710750981395_alter_table_public_contest_add_column_playground_switch/up.sql
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,2 @@ | ||
alter table "public"."contest" add column "playground_switch" boolean | ||
not null default 'False'; |
4 changes: 4 additions & 0 deletions
4
migrations/1710751010459_alter_table_public_contest_add_column_stream_switch/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest" add column "stream_switch" boolean | ||
-- not null default 'False'; |
2 changes: 2 additions & 0 deletions
2
migrations/1710751010459_alter_table_public_contest_add_column_stream_switch/up.sql
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,2 @@ | ||
alter table "public"."contest" add column "stream_switch" boolean | ||
not null default 'False'; |
4 changes: 4 additions & 0 deletions
4
migrations/1710751030097_alter_table_public_contest_add_column_playback_switch/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest" add column "playback_switch" boolean | ||
-- not null default 'False'; |
2 changes: 2 additions & 0 deletions
2
migrations/1710751030097_alter_table_public_contest_add_column_playback_switch/up.sql
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,2 @@ | ||
alter table "public"."contest" add column "playback_switch" boolean | ||
not null default 'False'; |
1 change: 1 addition & 0 deletions
1
migrations/1710752631551_alter_table_public_contest_alter_column_name/down.sql
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 @@ | ||
alter table "public"."contest" alter column "name" drop not null; |
1 change: 1 addition & 0 deletions
1
migrations/1710752631551_alter_table_public_contest_alter_column_name/up.sql
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 @@ | ||
alter table "public"."contest" alter column "name" set not null; |
4 changes: 4 additions & 0 deletions
4
migrations/1710754398576_alter_table_public_contest_team_player_add_column_role/down.sql
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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- alter table "public"."contest_team_player" add column "role" text | ||
-- null; |
2 changes: 2 additions & 0 deletions
2
migrations/1710754398576_alter_table_public_contest_team_player_add_column_role/up.sql
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,2 @@ | ||
alter table "public"."contest_team_player" add column "role" text | ||
null; |
5 changes: 5 additions & 0 deletions
5
migrations/1710754676936_delete_fk_public_contest_code_contest_code_contest_id_fkey/down.sql
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,5 @@ | ||
alter table "public"."contest_code" | ||
add constraint "contest_code_contest_id_fkey" | ||
foreign key ("contest_id") | ||
references "public"."contest" | ||
("id") on update cascade on delete cascade; |
1 change: 1 addition & 0 deletions
1
migrations/1710754676936_delete_fk_public_contest_code_contest_code_contest_id_fkey/up.sql
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 @@ | ||
alter table "public"."contest_code" drop constraint "contest_code_contest_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
migrations/1710754793577_delete_fk_public_contest_code_contest_code_team_id_fkey/down.sql
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,5 @@ | ||
alter table "public"."contest_code" | ||
add constraint "contest_code_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update cascade on delete cascade; |
1 change: 1 addition & 0 deletions
1
migrations/1710754793577_delete_fk_public_contest_code_contest_code_team_id_fkey/up.sql
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 @@ | ||
alter table "public"."contest_code" drop constraint "contest_code_team_id_fkey"; |