admin/sql/migrate_t_issue_template_concurrency.sql
zzh 4f5390ccb1 fix(channel): 问题模板表补充 ConcurrencyStamp 列
与 AggregateRoot 实体对齐,修复 list 接口 Unknown column 报错。
2026-07-06 15:21:43 +08:00

9 lines
410 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 已执行旧版 migrate_t_issue_template.sql 的库补 ConcurrencyStamp(与 AggregateRoot 实体对齐)
-- 勿在 ALTER 中使用 DEFAULT(UUID()),复制环境会报 Error 1674
ALTER TABLE `t_issue_template`
ADD COLUMN `ConcurrencyStamp` CHAR(36) NOT NULL DEFAULT '' COMMENT '并发戳' AFTER `IsDeleted`;
UPDATE `t_issue_template`
SET `ConcurrencyStamp` = UUID()
WHERE `ConcurrencyStamp` = '';