-- IoT MQTT：sys_config 编码说明（无则走 application.yml 的 iot.enabled / topics）
-- iot.mqtt.enabled     值 true/false，status=1 生效
-- iot.topic.egress_stow / egress_pick / egress_feedback / ingress_stow / ingress_pick / ingress_feedback

IF NOT EXISTS (SELECT 1 FROM sys_config WHERE code = N'iot.mqtt.enabled')
BEGIN
    INSERT INTO sys_config (name, code, value, type, status)
    VALUES (N'IoT MQTT 总开关', N'iot.mqtt.enabled', N'false', 1, 1);
END;
