历史上一共 6 条站内信(最后一条 2025-06),发信接口两代前端都没接过,后台页面只有一句 「未完待续」,OJ2 顶栏也没有入口。 0033 是 DROP TABLE,部署要显式放行:OJ2_ALLOW_DESTRUCTIVE=1 docker/deploy.sh, 或 CI 手工触发时勾 allow_destructive。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
734f4aed05
commit
4240a451e4
13 files changed
+3838
-308
No files matched your search
@@ -0,0 +1,3 @@
|
||||
-- 站内信整条下线(2026-10-13):表里历史上一共 6 条(最后一条 2025-06),发信接口两代前端都
|
||||
-- 没接过,后台页面只是一句「未完待续」,OJ2 的顶栏也没有入口。页面、接口、契约同一个提交里删掉。
|
||||
DROP TABLE "message" CASCADE;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -232,6 +232,13 @@
|
||||
"when": 1791821976519,
|
||||
"tag": "0032_achievement_cleanup",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 33,
|
||||
"version": "7",
|
||||
"when": 1791823809856,
|
||||
"tag": "0033_drop_message",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -273,58 +273,6 @@ export const flowchartSubmission = pgTable(
|
||||
],
|
||||
)
|
||||
|
||||
export const message = pgTable(
|
||||
"message",
|
||||
{
|
||||
id: integer().primaryKey().generatedByDefaultAsIdentity({
|
||||
name: "message_id_seq",
|
||||
startWith: 1,
|
||||
increment: 1,
|
||||
minValue: 1,
|
||||
maxValue: 2147483647,
|
||||
cache: 1,
|
||||
}),
|
||||
message: text().notNull(),
|
||||
createTime: timestamp("create_time", {
|
||||
withTimezone: true,
|
||||
mode: "string",
|
||||
}).notNull(),
|
||||
recipientId: integer("recipient_id").notNull(),
|
||||
senderId: integer("sender_id").notNull(),
|
||||
submissionId: text("submission_id").notNull(),
|
||||
},
|
||||
(table) => [
|
||||
index("message_recipient_time_idx").using(
|
||||
"btree",
|
||||
table.recipientId.asc().nullsLast().op("timestamptz_ops"),
|
||||
table.createTime.asc().nullsLast().op("int4_ops"),
|
||||
),
|
||||
index("message_sender_id_a2a2e825").using(
|
||||
"btree",
|
||||
table.senderId.asc().nullsLast().op("int4_ops"),
|
||||
),
|
||||
index("message_submission_id_2fdf8a47").using(
|
||||
"btree",
|
||||
table.submissionId.asc().nullsLast().op("text_ops"),
|
||||
),
|
||||
foreignKey({
|
||||
columns: [table.recipientId],
|
||||
foreignColumns: [user.id],
|
||||
name: "message_recipient_id_2aa5dd76_fk_user_id",
|
||||
}),
|
||||
foreignKey({
|
||||
columns: [table.senderId],
|
||||
foreignColumns: [user.id],
|
||||
name: "message_sender_id_a2a2e825_fk_user_id",
|
||||
}),
|
||||
foreignKey({
|
||||
columns: [table.submissionId],
|
||||
foreignColumns: [submission.id],
|
||||
name: "message_submission_id_2fdf8a47_fk_submission_id",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
)
|
||||
|
||||
export const judgeServer = pgTable("judge_server", {
|
||||
id: serial().primaryKey().notNull(),
|
||||
hostname: text().notNull(),
|
||||
@@ -903,7 +851,7 @@ export const submission = pgTable(
|
||||
* - `since_prev_ms` 是唯一由**服务端**算的一列(距同一用户同一道题上一次提交),
|
||||
* 客户端伪造不了;这道题的第一次提交为 null。
|
||||
* - CASCADE 挂在 submission 上、不挂 user:它是提交的附属,提交没了它没有意义,
|
||||
* 人是谁顺着 submission 就能查到。同表的 message / problemset_submission 也是这一档。
|
||||
* 人是谁顺着 submission 就能查到。同表的 problemset_submission 也是这一档。
|
||||
*/
|
||||
export const submissionTrace = pgTable(
|
||||
"submission_trace",
|
||||
|
||||
Reference in new issue
Block a user