Files
databasus/backend/migrations/20250716072247_add_discord_notifier.sql
2025-07-16 10:33:11 +03:00

24 lines
514 B
SQL

-- +goose Up
-- +goose StatementBegin
-- Create discord notifiers table
CREATE TABLE discord_notifiers (
notifier_id UUID PRIMARY KEY,
channel_webhook_url TEXT NOT NULL
);
ALTER TABLE discord_notifiers
ADD CONSTRAINT fk_discord_notifiers_notifier
FOREIGN KEY (notifier_id)
REFERENCES notifiers (id)
ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS discord_notifiers;
-- +goose StatementEnd