huayang/backend/sql/patch_upgrade_i18n_schema.sql
liuwenxin 85083ab962 feat(site): integrate multilingual content management / 集成多语言内容管理
完善官网、管理后台与后端的多语言内容编辑和发布流程,调整站点页面及相关接口,并同步数据库脚本。

新增容器部署配置,改用环境变量注入数据库凭据;补充仓库忽略规则,并停止跟踪本地环境文件和 Maven 构建产物。
2026-09-10 14:46:06 +08:00

10 lines
525 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.

-- i18n 表结构升级(对齐国际化发布流程)
-- 执行环境:MySQL 8+
ALTER TABLE `huayang_i18n`
ADD COLUMN IF NOT EXISTS `fallback_lang_code` varchar(10) NOT NULL DEFAULT 'zh_cn' COMMENT '回退语言代码' AFTER `page_module`,
ADD COLUMN IF NOT EXISTS `translate_status` char(1) NOT NULL DEFAULT '1' COMMENT '发布状态(0草稿 1已发布)' AFTER `fallback_lang_code`;
ALTER TABLE `huayang_i18n`
ADD INDEX IF NOT EXISTS `idx_lang_status_module`(`lang_code`, `translate_status`, `page_module`);