纳入范围: - backend/ Spring Boot 多模块后端(iot-common/device/rule/data/alarm/auth) - frontend/admin/ Vue3 + Element Plus 管理后台 - Android/ 涂鸦原生 APP (com.xhai.iot) - backend/sql/ Flyway 风格迁移脚本(V2~V21) - docs/ 对接文档与设计文档 排除范围: - 构建产物: node_modules/ target/ build/ dist/ .gradle/ - 签名密钥: *.jks *.keystore (严禁入库) - 本机配置: Android/local.properties - 运行日志: logs/ *.log - AI 协作本地数据 .codebuddy/ 与第三方 demo tuya-demo/ .gitattributes 统一以 LF 存储, Windows 批处理保留 CRLF
16 lines
695 B
SQL
16 lines
695 B
SQL
-- V10: 场景定时执行支持
|
|
-- 为 scene 表增加 cron 定时表达式,支持场景定时触发(类似智能家居"定时场景")。
|
|
-- cron 表达式格式: "秒 分 时 日 月 周" 六个字段,例如:
|
|
-- 每天 07:30 "0 30 7 * * ?"
|
|
-- 工作日 22:00 "0 0 22 ? * MON-FRI"
|
|
-- 每 30 分钟 "0 0/30 * * * ?"
|
|
|
|
ALTER TABLE scene
|
|
ADD COLUMN cron_expression VARCHAR(64) DEFAULT NULL COMMENT '定时执行cron表达式(六段式),空表示不定时' AFTER scene_type;
|
|
|
|
ALTER TABLE scene
|
|
ADD COLUMN last_trigger_time DATETIME DEFAULT NULL COMMENT '上次定时触发时间' AFTER cron_expression;
|
|
|
|
ALTER TABLE scene
|
|
ADD KEY idx_scene_cron (cron_expression);
|