Channels of the new types store their settings with secrets sealed and bound to type and field, never return them, and keep them when an update leaves them empty. Messages are rendered in the channel's language with a link to the monitor. The channels page offers every service with its fields. Closes #92 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
11 lines
640 B
SQL
11 lines
640 B
SQL
-- +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'));
|