Skip to content

Commit 5ab4f75

Browse files
authored
added THUAI-RL tables (#226)
1 parent 37330bc commit 5ab4f75

5 files changed

Lines changed: 51 additions & 0 deletions

File tree

metadata/tables.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,13 @@
12131213
using:
12141214
foreign_key_constraint_on: team_leader_uuid
12151215
array_relationships:
1216+
- name: contest_team_RL_scores
1217+
using:
1218+
foreign_key_constraint_on:
1219+
column: team_id
1220+
table:
1221+
name: contest_team_RL_score
1222+
schema: public
12161223
- name: contest_team_codes
12171224
using:
12181225
foreign_key_constraint_on:
@@ -1455,6 +1462,45 @@
14551462
filter:
14561463
team_leader_uuid:
14571464
_eq: X-Hasura-User-Id
1465+
- table:
1466+
name: contest_team_RL_code
1467+
schema: public
1468+
- table:
1469+
name: contest_team_RL_score
1470+
schema: public
1471+
object_relationships:
1472+
- name: contest_team
1473+
using:
1474+
foreign_key_constraint_on: team_id
1475+
select_permissions:
1476+
- role: anonymous
1477+
permission:
1478+
columns:
1479+
- score
1480+
- team_id
1481+
filter: {}
1482+
comment: ""
1483+
- role: counselor
1484+
permission:
1485+
columns:
1486+
- score
1487+
- team_id
1488+
filter: {}
1489+
comment: ""
1490+
- role: student
1491+
permission:
1492+
columns:
1493+
- score
1494+
- team_id
1495+
filter: {}
1496+
comment: ""
1497+
- role: teacher
1498+
permission:
1499+
columns:
1500+
- score
1501+
- team_id
1502+
filter: {}
1503+
comment: ""
14581504
- table:
14591505
name: contest_team_code
14601506
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_RL_code";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CREATE TABLE "public"."contest_team_RL_code" ("submit_id" uuid NOT NULL DEFAULT gen_random_uuid(), "team_id" uuid NOT NULL, "created_at" Timestamp NOT NULL DEFAULT now(), "url" text NOT NULL, PRIMARY KEY ("submit_id") , UNIQUE ("submit_id"));
2+
CREATE EXTENSION IF NOT EXISTS pgcrypto;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE "public"."contest_team_RL_score";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE TABLE "public"."contest_team_RL_score" ("team_id" uuid NOT NULL, "score" integer NOT NULL DEFAULT 0, PRIMARY KEY ("team_id") , FOREIGN KEY ("team_id") REFERENCES "public"."contest_team"("team_id") ON UPDATE cascade ON DELETE cascade, UNIQUE ("team_id"));

0 commit comments

Comments
 (0)