Skip to content

Commit 522edcb

Browse files
authored
添加了专门存软设比赛代码数据的table (#218)
* test commit for downgrade of postgres * feat: llm_list for selection * added llm tables * added LLM user email tracking * modified LLM chat token limit permission * modified software competition code management
1 parent 6677063 commit 522edcb

15 files changed

Lines changed: 36 additions & 0 deletions

File tree

  • metadata
  • migrations
    • 1771986413939_create_table_public_contest_team_software_code
    • 1771986800925_alter_table_public_contest_team_software_code_alter_column_created_at
    • 1771986811395_alter_table_public_contest_team_software_code_alter_column_updated_at
    • 1771986816910_alter_table_public_contest_team_software_code_alter_column_created_at
    • 1771986986594_alter_table_public_contest_team_software_code_alter_column_submission_count
    • 1771987349040_alter_table_public_contest_team_software_code_add_column_contest_id
    • 1771987373906_set_fk_public_contest_team_software_code_contest_id

metadata/tables.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,13 @@
12381238
table:
12391239
name: contest_room_team
12401240
schema: public
1241+
- name: contest_team_software_codes
1242+
using:
1243+
foreign_key_constraint_on:
1244+
column: team_id
1245+
table:
1246+
name: contest_team_software_code
1247+
schema: public
12411248
insert_permissions:
12421249
- role: counselor
12431250
permission:
@@ -2035,6 +2042,13 @@
20352042
contest_team_members:
20362043
user_uuid:
20372044
_eq: X-Hasura-User-Id
2045+
- table:
2046+
name: contest_team_software_code
2047+
schema: public
2048+
object_relationships:
2049+
- name: contest_team
2050+
using:
2051+
foreign_key_constraint_on: team_id
20382052
- table:
20392053
name: contest_time
20402054
schema: public
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE "public"."contest_team_software_code";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE TABLE "public"."contest_team_software_code" ("team_id" uuid NOT NULL, "URL" text NOT NULL, "created_at" Timestamp NOT NULL, "updated_at" timestamptz NOT NULL, "submission_count" integer NOT NULL, PRIMARY KEY ("team_id") , FOREIGN KEY ("team_id") REFERENCES "public"."contest_team"("team_id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("team_id"));
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."contest_team_software_code" ALTER COLUMN "created_at" drop default;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."contest_team_software_code" alter column "created_at" set default now();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."contest_team_software_code" ALTER COLUMN "updated_at" drop default;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."contest_team_software_code" alter column "updated_at" set default now();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."contest_team_software_code" ALTER COLUMN "created_at" TYPE timestamp without time zone;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."contest_team_software_code" ALTER COLUMN "created_at" TYPE timestamptz;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."contest_team_software_code" ALTER COLUMN "submission_count" drop default;

0 commit comments

Comments
 (0)