user-lib/migrations/3_credential.sql

10 lines
315 B
MySQL
Raw Normal View History

2023-09-20 20:23:29 +00:00
CREATE TABLE IF NOT EXISTS credential (
user_id INT NOT NULL,
credential_type VARCHAR NOT NULL,
credential VARCHAR NOT NULL,
2023-09-20 21:49:40 +00:00
validated BOOLEAN NOT NULL,
2023-09-20 20:23:29 +00:00
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL,
2023-09-20 21:49:40 +00:00
PRIMARY KEY(user_id, credential_type),
UNIQUE(credential)
2023-09-20 20:23:29 +00:00
);