This commit is contained in:
Your Name
2026-03-23 18:02:16 +08:00
parent 18fee2e8f8
commit 250d173c2f
525 changed files with 10659 additions and 793 deletions
+18
View File
@@ -0,0 +1,18 @@
-- 更新旧数据,为新字段设置默认值
-- 这样可以确保所有记录都有完整的数据
UPDATE `zyt_tcm_prescription`
SET
`usage_days` = COALESCE(`usage_days`, 7),
`usage_time` = COALESCE(`usage_time`, '饭前'),
`usage_way` = COALESCE(`usage_way`, '温水送服'),
`dietary_taboo` = COALESCE(`dietary_taboo`, ''),
`usage_notes` = COALESCE(`usage_notes`, ''),
`is_shared` = COALESCE(`is_shared`, 0)
WHERE `delete_time` IS NULL;
-- 查看更新结果
SELECT id, sn, prescription_name, usage_days, usage_time, usage_way, dietary_taboo, usage_notes, is_shared
FROM `zyt_tcm_prescription`
WHERE `delete_time` IS NULL
LIMIT 5;