chore(pl): add pl_plan.create_date migration and DDL snapshot

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-27 16:27:32 +08:00
1 parent 60841264e0
commit 5ebaec2e2e
2 files changed
+17

No files matched your search

@@ -0,0 +1,16 @@
-- backend/scripts/migrate_20260727_pl_plan_create_date.sql
-- 运输计划:业务创建日期 create_date(与系统 create_time 独立)
ALTER TABLE `pl_plan`
ADD COLUMN `create_date` date DEFAULT NULL COMMENT '创建日期' AFTER `plan_no`;
UPDATE `pl_plan`
SET `create_date` = DATE(`create_time`)
WHERE `create_date` IS NULL AND `create_time` IS NOT NULL;
UPDATE `pl_plan`
SET `create_date` = CURDATE()
WHERE `create_date` IS NULL;
ALTER TABLE `pl_plan`
MODIFY COLUMN `create_date` date NOT NULL COMMENT '创建日期';