This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
forked from eesast/hasura
-
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.
Merge pull request eesast#152 from xiangmy21/dev
feat(code): add contest_team_code & contest_team_player
- Loading branch information
Showing
13 changed files
with
301 additions
and
0 deletions.
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
1 change: 1 addition & 0 deletions
1
migrations/1710695701056_create_table_public_contest_team_code/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_team_code"; |
2 changes: 2 additions & 0 deletions
2
migrations/1710695701056_create_table_public_contest_team_code/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 @@ | ||
CREATE TABLE "public"."contest_team_code" ("team_id" uuid NOT NULL, "code_id" uuid NOT NULL DEFAULT gen_random_uuid(), "code_name" text NOT NULL, "language" text NOT NULL, "compile_status" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("code_id") , UNIQUE ("code_id"));COMMENT ON TABLE "public"."contest_team_code" IS E'记录每个team上传的所有code'; | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
1 change: 1 addition & 0 deletions
1
migrations/1710695749035_alter_table_public_contest_team_code_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_team_code" is NULL; |
1 change: 1 addition & 0 deletions
1
migrations/1710695749035_alter_table_public_contest_team_code_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_team_code" is E'记录每个team上传的所有code,角色应从上传的code中选择一份。'; |
1 change: 1 addition & 0 deletions
1
migrations/1710696330148_create_table_public_contest_team_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_team_player"; |
1 change: 1 addition & 0 deletions
1
migrations/1710696330148_create_table_public_contest_team_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_team_player" ("team_id" uuid NOT NULL, "player" text NOT NULL, "code_id" uuid, PRIMARY KEY ("team_id","player") );COMMENT ON TABLE "public"."contest_team_player" IS E'记录每个team的每个player选择了哪份code'; |
1 change: 1 addition & 0 deletions
1
migrations/1710696541220_set_fk_public_contest_team_player_code_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 @@ | ||
alter table "public"."contest_team_player" drop constraint "contest_team_player_code_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
migrations/1710696541220_set_fk_public_contest_team_player_code_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_player" | ||
add constraint "contest_team_player_code_id_fkey" | ||
foreign key ("code_id") | ||
references "public"."contest_team_code" | ||
("code_id") on update restrict on delete set null; |
1 change: 1 addition & 0 deletions
1
migrations/1710696708882_set_fk_public_contest_team_code_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 @@ | ||
alter table "public"."contest_team_code" drop constraint "contest_team_code_team_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
migrations/1710696708882_set_fk_public_contest_team_code_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_code" | ||
add constraint "contest_team_code_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update restrict on delete cascade; |
1 change: 1 addition & 0 deletions
1
migrations/1710696941945_set_fk_public_contest_team_player_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 @@ | ||
alter table "public"."contest_team_player" drop constraint "contest_team_player_team_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
migrations/1710696941945_set_fk_public_contest_team_player_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_player" | ||
add constraint "contest_team_player_team_id_fkey" | ||
foreign key ("team_id") | ||
references "public"."contest_team" | ||
("team_id") on update restrict on delete cascade; |