user-lib/migrations/102_credential.sql
2023-09-21 13:13:10 -04:00

10 lines
317 B
SQL

CREATE TABLE IF NOT EXISTS "credential" (
user_id INT NOT NULL,
credential_type VARCHAR NOT NULL,
credential VARCHAR NOT NULL,
validated BOOLEAN NOT NULL,
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL,
PRIMARY KEY(user_id, credential_type),
UNIQUE(credential)
);