Files
OJ2/apps/api/src/db/meta/0035_snapshot.json
T
xuyueandClaude Opus 5.5 55038cc78b
Deploy / deploy (push) Canceled after 0s
fix(判题): 判题机卡住不再让全班一直「等待评分」,重判和同时交对也不再把做对题数算多
- 正式判题、样例重跑、运行时错误诊断都加了超时(默认 120 秒,时限放宽的题按比例放宽),
  超时记系统错误、提示是中文;回包和试运行一样边读边数,超过 16MB 就掐断,
  免得一个疯狂打印的错误程序把 worker 撑爆
- 做对题数、中等、困难、一次就对改成在锁里按定义现数:原来逐次 +1,两条挨着判完或重判
  一条做对的提交都会多加,库里 372 人多了 1–4 道。0035 把存量一次订正
- 重判不再给提交次数、凌晨/早起计数 +1,编译错误按前后差值改;「错了几次才对」只数这条之前的
- 已拿到的成就数只 jsonb_set 那一个键,不再整块写回冲掉并发判题刚写的指标

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:15:08 +08:00

3832 lines
99 KiB
JSON

{
"id": "e3964b11-68dc-4e9d-9724-40e6812f8538",
"prevId": "80dc0df9-5ecd-403b-9535-7d4b15839408",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.achievement": {
"name": "achievement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "achievement_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"icon": {
"name": "icon",
"type": "text",
"primaryKey": false,
"notNull": true
},
"rarity": {
"name": "rarity",
"type": "text",
"primaryKey": false,
"notNull": true
},
"hidden": {
"name": "hidden",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"metric": {
"name": "metric",
"type": "text",
"primaryKey": false,
"notNull": true
},
"operator": {
"name": "operator",
"type": "text",
"primaryKey": false,
"notNull": true
},
"threshold": {
"name": "threshold",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"visible": {
"name": "visible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"unlock_count": {
"name": "unlock_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.acm_contest_rank": {
"name": "acm_contest_rank",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"submission_number": {
"name": "submission_number",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"accepted_number": {
"name": "accepted_number",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"total_time": {
"name": "total_time",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"submission_info": {
"name": "submission_info",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"contest_id": {
"name": "contest_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"acm_rank_contest_user_idx": {
"name": "acm_rank_contest_user_idx",
"columns": [
{
"expression": "contest_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"acm_rank_order_idx": {
"name": "acm_rank_order_idx",
"columns": [
{
"expression": "contest_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "accepted_number",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "total_time",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"acm_contest_rank_contest_id_21030ccd_fk_contest_id": {
"name": "acm_contest_rank_contest_id_21030ccd_fk_contest_id",
"tableFrom": "acm_contest_rank",
"columnsFrom": [
"contest_id"
],
"tableTo": "contest",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"acm_contest_rank_user_id_40391ab2_fk_user_id": {
"name": "acm_contest_rank_user_id_40391ab2_fk_user_id",
"tableFrom": "acm_contest_rank",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_acm_rank_user_contest": {
"name": "unique_acm_rank_user_contest",
"columns": [
"contest_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.ai_analysis": {
"name": "ai_analysis",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "ai_analysis_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"provider": {
"name": "provider",
"type": "text",
"primaryKey": false,
"notNull": true
},
"data": {
"name": "data",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"system_prompt": {
"name": "system_prompt",
"type": "text",
"primaryKey": false,
"notNull": true
},
"user_prompt": {
"name": "user_prompt",
"type": "text",
"primaryKey": false,
"notNull": true
},
"analysis": {
"name": "analysis",
"type": "text",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"model": {
"name": "model",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_pinned": {
"name": "is_pinned",
"type": "boolean",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"ai_analysis_user_id_3aa23011": {
"name": "ai_analysis_user_id_3aa23011",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"ai_analysis_user_id_3aa23011_fk_user_id": {
"name": "ai_analysis_user_id_3aa23011_fk_user_id",
"tableFrom": "ai_analysis",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.ai_hint": {
"name": "ai_hint",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "ai_hint_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"submission_id": {
"name": "submission_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"model": {
"name": "model",
"type": "text",
"primaryKey": false,
"notNull": true
},
"prompt_version": {
"name": "prompt_version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"error": {
"name": "error",
"type": "text",
"primaryKey": false,
"notNull": false
},
"duration_ms": {
"name": "duration_ms",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"diagnosis": {
"name": "diagnosis",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"diagnosis_error": {
"name": "diagnosis_error",
"type": "text",
"primaryKey": false,
"notNull": false
},
"level": {
"name": "level",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"filter_attempt": {
"name": "filter_attempt",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"filter_blocked": {
"name": "filter_blocked",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"filter_reason": {
"name": "filter_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"helpful": {
"name": "helpful",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"feedback_time": {
"name": "feedback_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"ai_hint_submission_id_idx": {
"name": "ai_hint_submission_id_idx",
"columns": [
{
"expression": "submission_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"ai_hint_submission_id_fk_submission_id": {
"name": "ai_hint_submission_id_fk_submission_id",
"tableFrom": "ai_hint",
"columnsFrom": [
"submission_id"
],
"tableTo": "submission",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.announcement": {
"name": "announcement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_update_time": {
"name": "last_update_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"visible": {
"name": "visible",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"created_by_id": {
"name": "created_by_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"tag": {
"name": "tag",
"type": "text",
"primaryKey": false,
"notNull": true
},
"top": {
"name": "top",
"type": "boolean",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"announcement_created_by_id_359ccf50": {
"name": "announcement_created_by_id_359ccf50",
"columns": [
{
"expression": "created_by_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"announcement_list_idx": {
"name": "announcement_list_idx",
"columns": [
{
"expression": "visible",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "top",
"isExpression": false,
"asc": false,
"nulls": "first"
},
{
"expression": "create_time",
"isExpression": false,
"asc": false,
"nulls": "first"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"announcement_created_by_id_359ccf50_fk_user_id": {
"name": "announcement_created_by_id_359ccf50_fk_user_id",
"tableFrom": "announcement",
"columnsFrom": [
"created_by_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.class_lesson": {
"name": "class_lesson",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "class_lesson_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "2147483647",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"class_name": {
"name": "class_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"day": {
"name": "day",
"type": "text",
"primaryKey": false,
"notNull": true
},
"problem_ids": {
"name": "problem_ids",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"language": {
"name": "language",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"class_lesson_created_by_idx": {
"name": "class_lesson_created_by_idx",
"columns": [
{
"expression": "created_by",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"class_lesson_created_by_fk_user_id": {
"name": "class_lesson_created_by_fk_user_id",
"tableFrom": "class_lesson",
"columnsFrom": [
"created_by"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"class_lesson_class_day_unique": {
"name": "class_lesson_class_day_unique",
"columns": [
"class_name",
"day"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.contest": {
"name": "contest",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false
},
"start_time": {
"name": "start_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"end_time": {
"name": "end_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_update_time": {
"name": "last_update_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"visible": {
"name": "visible",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"created_by_id": {
"name": "created_by_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"tag": {
"name": "tag",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"contest_created_by_id_a763ca7e": {
"name": "contest_created_by_id_a763ca7e",
"columns": [
{
"expression": "created_by_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"contest_created_by_id_a763ca7e_fk_user_id": {
"name": "contest_created_by_id_a763ca7e_fk_user_id",
"tableFrom": "contest",
"columnsFrom": [
"created_by_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.exercise": {
"name": "exercise",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "exercise_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "2147483647",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"type": {
"name": "type",
"type": "varchar(16)",
"primaryKey": false,
"notNull": true
},
"data": {
"name": "data",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"tutorial_id": {
"name": "tutorial_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"exercise_tutorial_id_6fd04055": {
"name": "exercise_tutorial_id_6fd04055",
"columns": [
{
"expression": "tutorial_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"exercise_tutorial_id_6fd04055_fk_tutorial_id": {
"name": "exercise_tutorial_id_6fd04055_fk_tutorial_id",
"tableFrom": "exercise",
"columnsFrom": [
"tutorial_id"
],
"tableTo": "tutorial",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.exercise_attempt": {
"name": "exercise_attempt",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"exercise_id": {
"name": "exercise_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"attempts": {
"name": "attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"wrong_attempts": {
"name": "wrong_attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"solved": {
"name": "solved",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"attempts_to_solve": {
"name": "attempts_to_solve",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"last_wrong_answer": {
"name": "last_wrong_answer",
"type": "text",
"primaryKey": false,
"notNull": false
},
"first_attempt_at": {
"name": "first_attempt_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_attempt_at": {
"name": "last_attempt_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"solved_at": {
"name": "solved_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"exercise_attempt_exercise_id_idx": {
"name": "exercise_attempt_exercise_id_idx",
"columns": [
{
"expression": "exercise_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"exercise_attempt_user_id_fk_user_id": {
"name": "exercise_attempt_user_id_fk_user_id",
"tableFrom": "exercise_attempt",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"exercise_attempt_exercise_id_fk_exercise_id": {
"name": "exercise_attempt_exercise_id_fk_exercise_id",
"tableFrom": "exercise_attempt",
"columnsFrom": [
"exercise_id"
],
"tableTo": "exercise",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"exercise_attempt_pkey": {
"name": "exercise_attempt_pkey",
"columns": [
"user_id",
"exercise_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.flowchart_submission": {
"name": "flowchart_submission",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"mermaid_code": {
"name": "mermaid_code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"flowchart_data": {
"name": "flowchart_data",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"ai_score": {
"name": "ai_score",
"type": "double precision",
"primaryKey": false,
"notNull": false
},
"ai_grade": {
"name": "ai_grade",
"type": "varchar(10)",
"primaryKey": false,
"notNull": false
},
"ai_feedback": {
"name": "ai_feedback",
"type": "text",
"primaryKey": false,
"notNull": false
},
"ai_suggestions": {
"name": "ai_suggestions",
"type": "text",
"primaryKey": false,
"notNull": false
},
"ai_criteria_details": {
"name": "ai_criteria_details",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"ai_provider": {
"name": "ai_provider",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"ai_model": {
"name": "ai_model",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"processing_time": {
"name": "processing_time",
"type": "double precision",
"primaryKey": false,
"notNull": false
},
"evaluation_time": {
"name": "evaluation_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"flowchart_problem_time_idx": {
"name": "flowchart_problem_time_idx",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"flowchart_status_idx": {
"name": "flowchart_status_idx",
"columns": [
{
"expression": "status",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"flowchart_create_time_idx": {
"name": "flowchart_create_time_idx",
"columns": [
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"flowchart_user_time_idx": {
"name": "flowchart_user_time_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"flowchart_submission_problem_id_8551edbf_fk_problem_id": {
"name": "flowchart_submission_problem_id_8551edbf_fk_problem_id",
"tableFrom": "flowchart_submission",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"flowchart_submission_user_id_225c83e8_fk_user_id": {
"name": "flowchart_submission_user_id_225c83e8_fk_user_id",
"tableFrom": "flowchart_submission",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.judge_server": {
"name": "judge_server",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"hostname": {
"name": "hostname",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip": {
"name": "ip",
"type": "text",
"primaryKey": false,
"notNull": false
},
"judger_version": {
"name": "judger_version",
"type": "text",
"primaryKey": false,
"notNull": true
},
"cpu_core": {
"name": "cpu_core",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"memory_usage": {
"name": "memory_usage",
"type": "double precision",
"primaryKey": false,
"notNull": true
},
"cpu_usage": {
"name": "cpu_usage",
"type": "double precision",
"primaryKey": false,
"notNull": true
},
"last_heartbeat": {
"name": "last_heartbeat",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"task_number": {
"name": "task_number",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"service_url": {
"name": "service_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"is_disabled": {
"name": "is_disabled",
"type": "boolean",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.options_sysoptions": {
"name": "options_sysoptions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"value": {
"name": "value",
"type": "jsonb",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"options_sysoptions_key_key": {
"name": "options_sysoptions_key_key",
"columns": [
"key"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problem": {
"name": "problem",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"input_description": {
"name": "input_description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"output_description": {
"name": "output_description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"samples": {
"name": "samples",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"test_case_id": {
"name": "test_case_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"test_case_score": {
"name": "test_case_score",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"hint": {
"name": "hint",
"type": "text",
"primaryKey": false,
"notNull": false
},
"languages": {
"name": "languages",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"template": {
"name": "template",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_update_time": {
"name": "last_update_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"time_limit": {
"name": "time_limit",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"memory_limit": {
"name": "memory_limit",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"visible": {
"name": "visible",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"difficulty": {
"name": "difficulty",
"type": "text",
"primaryKey": false,
"notNull": true
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": false
},
"submission_number": {
"name": "submission_number",
"type": "bigint",
"primaryKey": false,
"notNull": true,
"default": 0
},
"accepted_number": {
"name": "accepted_number",
"type": "bigint",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_by_id": {
"name": "created_by_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"_id": {
"name": "_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"statistic_info": {
"name": "statistic_info",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"contest_id": {
"name": "contest_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"is_public": {
"name": "is_public",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"share_submission": {
"name": "share_submission",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"prompt": {
"name": "prompt",
"type": "text",
"primaryKey": false,
"notNull": false
},
"answers": {
"name": "answers",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"allow_flowchart": {
"name": "allow_flowchart",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"flowchart_data": {
"name": "flowchart_data",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"flowchart_hint": {
"name": "flowchart_hint",
"type": "text",
"primaryKey": false,
"notNull": false
},
"mermaid_code": {
"name": "mermaid_code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"show_flowchart": {
"name": "show_flowchart",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"ast_rules": {
"name": "ast_rules",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"sql_config": {
"name": "sql_config",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"sql_display": {
"name": "sql_display",
"type": "jsonb",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"problem_contest_visible_idx": {
"name": "problem_contest_visible_idx",
"columns": [
{
"expression": "contest_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "bool_ops"
},
{
"expression": "visible",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"problem_created_by_id_cb362143": {
"name": "problem_created_by_id_cb362143",
"columns": [
{
"expression": "created_by_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"problem_visible_idx": {
"name": "problem_visible_idx",
"columns": [
{
"expression": "visible",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "bool_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problem_contest_id_328e013a_fk_contest_id": {
"name": "problem_contest_id_328e013a_fk_contest_id",
"tableFrom": "problem",
"columnsFrom": [
"contest_id"
],
"tableTo": "contest",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"problem_created_by_id_cb362143_fk_user_id": {
"name": "problem_created_by_id_cb362143_fk_user_id",
"tableFrom": "problem",
"columnsFrom": [
"created_by_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_problem_id_contest": {
"name": "unique_problem_id_contest",
"columns": [
"_id",
"contest_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problem_tag": {
"name": "problem_tag",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'knowledge'"
},
"category_confirmed": {
"name": "category_confirmed",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
}
},
"indexes": {
"problem_tag_name_ci_unique": {
"name": "problem_tag_name_ci_unique",
"columns": [
{
"expression": "lower(name)",
"isExpression": true,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problem_tags": {
"name": "problem_tags",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"problemtag_id": {
"name": "problemtag_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"problem_tags_problemtag_id_72d20571": {
"name": "problem_tags_problemtag_id_72d20571",
"columns": [
{
"expression": "problemtag_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problem_tags_problem_id_866ecb8d_fk_problem_id": {
"name": "problem_tags_problem_id_866ecb8d_fk_problem_id",
"tableFrom": "problem_tags",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"problem_tags_problemtag_id_72d20571_fk_problem_tag_id": {
"name": "problem_tags_problemtag_id_72d20571_fk_problem_tag_id",
"tableFrom": "problem_tags",
"columnsFrom": [
"problemtag_id"
],
"tableTo": "problem_tag",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"problem_tags_problem_id_problemtag_id_318459d1_uniq": {
"name": "problem_tags_problem_id_problemtag_id_318459d1_uniq",
"columns": [
"problem_id",
"problemtag_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problemset": {
"name": "problemset",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "problemset_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_update_time": {
"name": "last_update_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"visible": {
"name": "visible",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"created_by_id": {
"name": "created_by_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"end_time": {
"name": "end_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"assigned_at": {
"name": "assigned_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"problemset_created_by_id_01b5197f": {
"name": "problemset_created_by_id_01b5197f",
"columns": [
{
"expression": "created_by_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problemset_created_by_id_01b5197f_fk_user_id": {
"name": "problemset_created_by_id_01b5197f_fk_user_id",
"tableFrom": "problemset",
"columnsFrom": [
"created_by_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problemset_badge": {
"name": "problemset_badge",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "problemset_badge_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"icon": {
"name": "icon",
"type": "text",
"primaryKey": false,
"notNull": true
},
"condition_type": {
"name": "condition_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"condition_value": {
"name": "condition_value",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"problemset_id": {
"name": "problemset_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"problemset_badge_problemset_id_6cb6c74f": {
"name": "problemset_badge_problemset_id_6cb6c74f",
"columns": [
{
"expression": "problemset_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int8_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problemset_badge_problemset_id_6cb6c74f_fk_problemset_id": {
"name": "problemset_badge_problemset_id_6cb6c74f_fk_problemset_id",
"tableFrom": "problemset_badge",
"columnsFrom": [
"problemset_id"
],
"tableTo": "problemset",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problemset_problem": {
"name": "problemset_problem",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "problemset_problem_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"is_required": {
"name": "is_required",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"problemset_id": {
"name": "problemset_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"problemset_problem_problem_id_fff2d686": {
"name": "problemset_problem_problem_id_fff2d686",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problemset_problem_problem_id_fff2d686_fk_problem_id": {
"name": "problemset_problem_problem_id_fff2d686_fk_problem_id",
"tableFrom": "problemset_problem",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"problemset_problem_problemset_id_350d17fb_fk_problemset_id": {
"name": "problemset_problem_problemset_id_350d17fb_fk_problemset_id",
"tableFrom": "problemset_problem",
"columnsFrom": [
"problemset_id"
],
"tableTo": "problemset",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_problemset_problem": {
"name": "unique_problemset_problem",
"columns": [
"problem_id",
"problemset_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.problemset_progress": {
"name": "problemset_progress",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "problemset_progress_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"join_time": {
"name": "join_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"complete_time": {
"name": "complete_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"is_completed": {
"name": "is_completed",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"completed_problems_count": {
"name": "completed_problems_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"total_problems_count": {
"name": "total_problems_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"progress_detail": {
"name": "progress_detail",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"problemset_id": {
"name": "problemset_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"problemset_progress_user_id_c8041a80": {
"name": "problemset_progress_user_id_c8041a80",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"problemset_progress_problemset_id_20a9632e_fk_problemset_id": {
"name": "problemset_progress_problemset_id_20a9632e_fk_problemset_id",
"tableFrom": "problemset_progress",
"columnsFrom": [
"problemset_id"
],
"tableTo": "problemset",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"problemset_progress_user_id_c8041a80_fk_user_id": {
"name": "problemset_progress_user_id_c8041a80_fk_user_id",
"tableFrom": "problemset_progress",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_problemset_progress_user": {
"name": "unique_problemset_progress_user",
"columns": [
"problemset_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.reaction": {
"name": "reaction",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "reaction_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "2147483647",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"type": {
"name": "type",
"type": "varchar(20)",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"reaction_problem_type_idx": {
"name": "reaction_problem_type_idx",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "type",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"reaction_user_id_cfa7f469": {
"name": "reaction_user_id_cfa7f469",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"reaction_problem_id_a7f3b9f3_fk_problem_id": {
"name": "reaction_problem_id_a7f3b9f3_fk_problem_id",
"tableFrom": "reaction",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"reaction_user_id_cfa7f469_fk_user_id": {
"name": "reaction_user_id_cfa7f469_fk_user_id",
"tableFrom": "reaction",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"reaction_problem_user_unique": {
"name": "reaction_problem_user_unique",
"columns": [
"problem_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.submission": {
"name": "submission",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"contest_id": {
"name": "contest_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"result": {
"name": "result",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 6
},
"info": {
"name": "info",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"language": {
"name": "language",
"type": "text",
"primaryKey": false,
"notNull": true
},
"shared": {
"name": "shared",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"statistic_info": {
"name": "statistic_info",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"username": {
"name": "username",
"type": "text",
"primaryKey": false,
"notNull": true
},
"problemset_id": {
"name": "problemset_id",
"type": "bigint",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"contest_create_time_idx": {
"name": "contest_create_time_idx",
"columns": [
{
"expression": "contest_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "create_time",
"isExpression": false,
"asc": false,
"nulls": "first"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"submission_public_create_time_id_idx": {
"name": "submission_public_create_time_id_idx",
"columns": [
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"problem_user_idx": {
"name": "problem_user_idx",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"submission_result_37e2f67a": {
"name": "submission_result_37e2f67a",
"columns": [
{
"expression": "result",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"user_create_time_idx": {
"name": "user_create_time_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"submission_language_time_idx": {
"name": "submission_language_time_idx",
"columns": [
{
"expression": "language",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_result_time_idx": {
"name": "submission_result_time_idx",
"columns": [
{
"expression": "result",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_public_problem_time_idx": {
"name": "submission_public_problem_time_idx",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_public_username_trgm_idx": {
"name": "submission_public_username_trgm_idx",
"columns": [
{
"expression": "username",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "gin_trgm_ops"
}
],
"isUnique": false,
"with": {},
"method": "gin",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_public_metrics_idx": {
"name": "submission_public_metrics_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "result",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "create_time",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_public_problem_user_idx": {
"name": "submission_public_problem_user_idx",
"columns": [
{
"expression": "problem_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "result",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"contest_id\" is null",
"concurrently": false
},
"submission_problemset_id_idx": {
"name": "submission_problemset_id_idx",
"columns": [
{
"expression": "problemset_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"where": "\"submission\".\"problemset_id\" is not null",
"concurrently": false
}
},
"foreignKeys": {
"submission_contest_id_775716d5_fk_contest_id": {
"name": "submission_contest_id_775716d5_fk_contest_id",
"tableFrom": "submission",
"columnsFrom": [
"contest_id"
],
"tableTo": "contest",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"submission_problem_id_76847b55_fk_problem_id": {
"name": "submission_problem_id_76847b55_fk_problem_id",
"tableFrom": "submission",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
},
"submission_problemset_id_fk_problemset_id": {
"name": "submission_problemset_id_fk_problemset_id",
"tableFrom": "submission",
"columnsFrom": [
"problemset_id"
],
"tableTo": "problemset",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.submission_trace": {
"name": "submission_trace",
"schema": "",
"columns": {
"submission_id": {
"name": "submission_id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"active_ms": {
"name": "active_ms",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"since_open_ms": {
"name": "since_open_ms",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"typed_chars": {
"name": "typed_chars",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"pasted_chars": {
"name": "pasted_chars",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"paste_count": {
"name": "paste_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"max_paste": {
"name": "max_paste",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"deleted_chars": {
"name": "deleted_chars",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"blur_count": {
"name": "blur_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"initial_len": {
"name": "initial_len",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"collab": {
"name": "collab",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"since_prev_ms": {
"name": "since_prev_ms",
"type": "bigint",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"submission_trace_submission_id_fk_submission_id": {
"name": "submission_trace_submission_id_fk_submission_id",
"tableFrom": "submission_trace",
"columnsFrom": [
"submission_id"
],
"tableTo": "submission",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tutorial": {
"name": "tutorial",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "tutorial_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "2147483647",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"title": {
"name": "title",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"is_public": {
"name": "is_public",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_by_id": {
"name": "created_by_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"type": {
"name": "type",
"type": "varchar(10)",
"primaryKey": false,
"notNull": true
},
"project": {
"name": "project",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"default": "''"
}
},
"indexes": {
"tutorial_created_by_id_07973cab": {
"name": "tutorial_created_by_id_07973cab",
"columns": [
{
"expression": "created_by_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"tutorial_created_by_id_07973cab_fk_user_id": {
"name": "tutorial_created_by_id_07973cab_fk_user_id",
"tableFrom": "tutorial",
"columnsFrom": [
"created_by_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tutorial_problem": {
"name": "tutorial_problem",
"schema": "",
"columns": {
"tutorial_id": {
"name": "tutorial_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"problem_id": {
"name": "problem_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"tutorial_problem_tutorial_id_fk_tutorial_id": {
"name": "tutorial_problem_tutorial_id_fk_tutorial_id",
"tableFrom": "tutorial_problem",
"columnsFrom": [
"tutorial_id"
],
"tableTo": "tutorial",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"tutorial_problem_problem_id_fk_problem_id": {
"name": "tutorial_problem_problem_id_fk_problem_id",
"tableFrom": "tutorial_problem",
"columnsFrom": [
"problem_id"
],
"tableTo": "problem",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"tutorial_problem_pkey": {
"name": "tutorial_problem_pkey",
"columns": [
"tutorial_id",
"problem_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tutorial_progress": {
"name": "tutorial_progress",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"tutorial_id": {
"name": "tutorial_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"view_count": {
"name": "view_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"total_seconds": {
"name": "total_seconds",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"first_viewed_at": {
"name": "first_viewed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"last_viewed_at": {
"name": "last_viewed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"tutorial_progress_tutorial_id_idx": {
"name": "tutorial_progress_tutorial_id_idx",
"columns": [
{
"expression": "tutorial_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"tutorial_progress_user_id_fk_user_id": {
"name": "tutorial_progress_user_id_fk_user_id",
"tableFrom": "tutorial_progress",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"tutorial_progress_tutorial_id_fk_tutorial_id": {
"name": "tutorial_progress_tutorial_id_fk_tutorial_id",
"tableFrom": "tutorial_progress",
"columnsFrom": [
"tutorial_id"
],
"tableTo": "tutorial",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {
"tutorial_progress_pkey": {
"name": "tutorial_progress_pkey",
"columns": [
"user_id",
"tutorial_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"password": {
"name": "password",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"last_login": {
"name": "last_login",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"username": {
"name": "username",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": false
},
"create_time": {
"name": "create_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"admin_type": {
"name": "admin_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_disabled": {
"name": "is_disabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"problem_permission": {
"name": "problem_permission",
"type": "text",
"primaryKey": false,
"notNull": true
},
"raw_password": {
"name": "raw_password",
"type": "varchar(20)",
"primaryKey": false,
"notNull": false
},
"class_name": {
"name": "class_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"rank_hidden_at": {
"name": "rank_hidden_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"user_active_idx": {
"name": "user_active_idx",
"columns": [
{
"expression": "is_disabled",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "last_login",
"isExpression": false,
"asc": false,
"nulls": "first"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"user_class_name_idx": {
"name": "user_class_name_idx",
"columns": [
{
"expression": "class_name",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_username_key": {
"name": "user_username_key",
"columns": [
"username"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user_achievement": {
"name": "user_achievement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "user_achievement_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"unlock_time": {
"name": "unlock_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"backfilled": {
"name": "backfilled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"notified": {
"name": "notified",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"achievement_id": {
"name": "achievement_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"user_achievement_achievement_id_29db600d": {
"name": "user_achievement_achievement_id_29db600d",
"columns": [
{
"expression": "achievement_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int8_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"user_achv_notified_idx": {
"name": "user_achv_notified_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "notified",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "bool_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"user_achv_time_idx": {
"name": "user_achv_time_idx",
"columns": [
{
"expression": "user_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int4_ops"
},
{
"expression": "unlock_time",
"isExpression": false,
"asc": false,
"nulls": "first",
"opclass": "timestamptz_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"user_achievement_achievement_id_29db600d_fk_achievement_id": {
"name": "user_achievement_achievement_id_29db600d_fk_achievement_id",
"tableFrom": "user_achievement",
"columnsFrom": [
"achievement_id"
],
"tableTo": "achievement",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"user_achievement_user_id_b8ec7d6a_fk_user_id": {
"name": "user_achievement_user_id_b8ec7d6a_fk_user_id",
"tableFrom": "user_achievement",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_user_achievement": {
"name": "unique_user_achievement",
"columns": [
"achievement_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user_badge": {
"name": "user_badge",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "user_badge_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"earned_time": {
"name": "earned_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"badge_id": {
"name": "badge_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"user_badge_badge_id_92a983e9": {
"name": "user_badge_badge_id_92a983e9",
"columns": [
{
"expression": "badge_id",
"isExpression": false,
"asc": true,
"nulls": "last",
"opclass": "int8_ops"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"user_badge_badge_id_92a983e9_fk_problemset_badge_id": {
"name": "user_badge_badge_id_92a983e9_fk_problemset_badge_id",
"tableFrom": "user_badge",
"columnsFrom": [
"badge_id"
],
"tableTo": "problemset_badge",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"user_badge_user_id_a286d718_fk_user_id": {
"name": "user_badge_user_id_a286d718_fk_user_id",
"tableFrom": "user_badge",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"unique_user_badge": {
"name": "unique_user_badge",
"columns": [
"badge_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user_profile": {
"name": "user_profile",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"acm_problems_status": {
"name": "acm_problems_status",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"avatar": {
"name": "avatar",
"type": "text",
"primaryKey": false,
"notNull": true
},
"mood": {
"name": "mood",
"type": "text",
"primaryKey": false,
"notNull": false
},
"accepted_number": {
"name": "accepted_number",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"submission_number": {
"name": "submission_number",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"real_name": {
"name": "real_name",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"user_profile_user_id_8fdce8e2_fk_user_id": {
"name": "user_profile_user_id_8fdce8e2_fk_user_id",
"tableFrom": "user_profile",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_profile_user_id_key": {
"name": "user_profile_user_id_key",
"columns": [
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user_stat": {
"name": "user_stat",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": true,
"notNull": true,
"identity": {
"name": "user_stat_id_seq",
"increment": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
"startWith": "1",
"cache": "1",
"cycle": false,
"schema": "public",
"type": "byDefault"
}
},
"metrics": {
"name": "metrics",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'{}'::jsonb"
},
"update_time": {
"name": "update_time",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"user_stat_user_id_73337fc0_fk_user_id": {
"name": "user_stat_user_id_73337fc0_fk_user_id",
"tableFrom": "user_stat",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_stat_user_id_key": {
"name": "user_stat_user_id_key",
"columns": [
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"views": {},
"sequences": {},
"roles": {},
"policies": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}