iotsaas/backend/sql/V16__scene_structured.sql
2995840376 0ce191c448 chore: 初始化 iotsaas 版本库基线
纳入范围:
- 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
2026-10-27 12:00:41 +08:00

9 lines
570 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.

-- P0 场景结构化:scene 表新增结构化条件/动作列
-- 与涂鸦 App SDK 场景模型对齐:scene 直接持有 conditions[] 与 actions[],
-- 条件/动作以物模型属性 code 为底座、平台无关。
ALTER TABLE scene
ADD COLUMN conditions JSON DEFAULT NULL COMMENT '结构化触发条件数组(device_state/timer/manual)',
ADD COLUMN actions JSON DEFAULT NULL COMMENT '结构化执行动作数组(set_property/delay/execute_scene/notify)',
ADD COLUMN condition_logic VARCHAR(8) DEFAULT 'AND' COMMENT '多条件逻辑关系 AND/OR';