Files
zyt/server/sql/1.9.20261110/05_assistant_service_alert_tenant.sql
T
2026-11-26 15:46:20 +08:00

6 lines
422 B
SQL

-- 现有业务库升级和新库建表后均执行一次。空值表示历史记录未经租户验证。
ALTER TABLE `zyt_assistant_service_alert`
ADD COLUMN `archive_tenant_id` varchar(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT '' AFTER `source_key`,
DROP INDEX `uk_channel_source_rule`,
ADD UNIQUE KEY `uk_channel_source_rule` (`channel`,`archive_tenant_id`,`source_id`,`source_key`,`rule_code`);