From c310769dd4912c3e7216a9382e8636203db006d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Tue, 28 Apr 2026 00:45:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(migration):=20add=5Fclazz=5Fcompleted=5Fat?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8=20IF=20NOT=20EXISTS=20=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- .../migrations/2026-04-27-100000_add_clazz_completed_at/up.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htykc_models/migrations/2026-04-27-100000_add_clazz_completed_at/up.sql b/htykc_models/migrations/2026-04-27-100000_add_clazz_completed_at/up.sql index b3b59fd..6ccc9f2 100644 --- a/htykc_models/migrations/2026-04-27-100000_add_clazz_completed_at/up.sql +++ b/htykc_models/migrations/2026-04-27-100000_add_clazz_completed_at/up.sql @@ -1,7 +1,7 @@ -- 业务「已结课」:首次点名落库时间;清空出勤后回到 NULL。与 start_from/end_by 日历态互补。 ALTER TABLE clazz - ADD COLUMN completed_at TIMESTAMP NULL; + ADD COLUMN IF NOT EXISTS completed_at TIMESTAMP NULL; COMMENT ON COLUMN clazz.completed_at IS '首次批量保存出勤且存在有效行时写入;出勤被清空则置 NULL。NULL 表示业务上未结课。';