user-lib/migrations/102_credential.sql

10 lines
317 B
MySQL
Raw Normal View History

2023-09-21 17:13:10 +00:00
CREATE TABLE IF NOT EXISTS "credential" (
2023-09-20 20:23:29 +00:00
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
);