12 lines
590 B
SQL
12 lines
590 B
SQL
-- Add up migration script here
|
|
CREATE TABLE confirmations (
|
|
identifier BYTEA PRIMARY KEY,
|
|
verifier_hash BYTEA NOT NULL,
|
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
action_type TEXT NOT NULL,
|
|
details JSONB,
|
|
expires_at TIMESTAMPTZ NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX idx_confirmations_user_id ON confirmations(user_id); |