this repo has no description
1ALTER TYPE notification_type ADD VALUE IF NOT EXISTS 'channel_verification';
2
3CREATE TABLE IF NOT EXISTS channel_verifications (
4 user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
5 channel notification_channel NOT NULL,
6 code TEXT NOT NULL,
7 expires_at TIMESTAMPTZ NOT NULL,
8 created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
9 PRIMARY KEY (user_id, channel)
10);
11
12CREATE INDEX IF NOT EXISTS idx_channel_verifications_expires ON channel_verifications(expires_at);