-- 文案模板增加分组字段(已有数据库升级脚本) ALTER TABLE `tt_copy_template` ADD COLUMN `template_group` VARCHAR(100) NOT NULL DEFAULT '默认分组' COMMENT '模板分组' AFTER `template_name`; -- 兼容历史空数据 UPDATE `tt_copy_template` SET `template_group` = '默认分组' WHERE `template_group` IS NULL OR TRIM(`template_group`) = '';