Files
zyt/server/sql/update_appointment_period.sql
T
2026-05-11 17:49:38 +08:00

9 lines
402 B
SQL
Executable File

-- 修改预约表的 period 字段,允许存储 'all' 值
-- 将 ENUM 改为 VARCHAR 以支持更灵活的时段类型
ALTER TABLE `la_doctor_appointment`
MODIFY COLUMN `period` varchar(20) NOT NULL DEFAULT 'all' COMMENT '时段:morning=上午,afternoon=下午,all=全天';
-- 更新现有数据(如果需要)
-- UPDATE `la_doctor_appointment` SET `period` = 'all' WHERE `period` = '';