-- ============================================================================ -- 余额告警通知频率策略:通知间隔、最大通知次数与当前通知状态 -- ============================================================================ ALTER TABLE merchant_alert_configs ADD COLUMN IF NOT EXISTS notify_interval_minutes INT NOT NULL DEFAULT 60; ALTER TABLE merchant_alert_configs ADD COLUMN IF NOT EXISTS max_notifications INT NOT NULL DEFAULT 5; ALTER TABLE merchant_alert_configs ADD COLUMN IF NOT EXISTS last_notified_at TIMESTAMPTZ; ALTER TABLE merchant_alert_configs ADD COLUMN IF NOT EXISTS notification_count INT NOT NULL DEFAULT 0;