-- +goose Up -- Channel types follow notify.Providers; the application validates them -- and their settings, secrets of which are sealed in config. ALTER TABLE notification_channels DROP CONSTRAINT notification_channels_type_check; ALTER TABLE notification_channels ADD CONSTRAINT notification_channels_type_check CHECK (type ~ '^[a-z]{2,32}$'); -- +goose Down DELETE FROM notification_channels WHERE type NOT IN ('webhook', 'email'); ALTER TABLE notification_channels DROP CONSTRAINT notification_channels_type_check; ALTER TABLE notification_channels ADD CONSTRAINT notification_channels_type_check CHECK (type IN ('webhook', 'email'));