feat(课堂看板): 「这节课」那排题号后面写上几点布置的,之后改题不变
Deploy / deploy (push) Canceled after 0s

class_lesson 加 created_at(0034,老数据用 updated_at 回填),「改」只动 updated_at;
清掉再布置算重新开始。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-13 10:21:39 +08:00
1 parent 5c1f1d2bf8
commit 5c9d0ca501
7 files changed
+3887 -4

No files matched your search

@@ -0,0 +1,4 @@
ALTER TABLE "class_lesson" ADD COLUMN "created_at" timestamp with time zone DEFAULT now();--> statement-breakpoint
-- 加这一列之前布置的:只剩最后一次改的时刻,拿它当布置时刻
UPDATE "class_lesson" SET "created_at" = "updated_at";--> statement-breakpoint
ALTER TABLE "class_lesson" ALTER COLUMN "created_at" SET NOT NULL;
File diff suppressed because it is too large. Load diff
+7
View File
@@ -239,6 +239,13 @@
"when": 1791823809856,
"tag": "0033_drop_message",
"breakpoints": true
},
{
"idx": 34,
"version": "7",
"when": 1791858070886,
"tag": "0034_add_class_lesson_created_at",
"breakpoints": true
}
]
}
+11
View File
@@ -1433,6 +1433,17 @@ export const classLesson = pgTable(
*/
language: text().$type<LessonLanguage>(),
createdBy: integer("created_by").notNull(),
/**
* 这天第一次布置的时刻,之后「改」只动 updatedAt。清掉(删行)再布置算重新开始。
* 加这一列之前布置的用 updated_at 回填(0034)。带默认值是给共库的另一个站点:
* 机房那套还没升级时,它的旧代码插入不带这一列
*/
createdAt: timestamp("created_at", {
withTimezone: true,
mode: "string",
})
.notNull()
.defaultNow(),
updatedAt: timestamp("updated_at", {
withTimezone: true,
mode: "string",