Files
uptimesebi/internal/migrations/sql/00034_notification_providers.sql
T
Sebastian UnterschützandClaude Opus 5.5 b01eefdbce
ci / image (pull_request) Successful in 3m1s
ci / test (pull_request) Successful in 6m17s
ci / build (pull_request) Successful in 8m47s
ci / lint (pull_request) Successful in 9m36s
feat: notification channels for chat, push and paging services
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
2026-11-22 16:07:24 +01:00

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'));