gamenight/backend/migrations/2022-04-17-175115_user-system/up.sql

12 lines
320 B
SQL

CREATE TABLE user (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
email TEXT UNIQUE NOT NULL,
role TEXT NOT NULL
);
CREATE TABLE pwd (
user_id INTEGER NOT NULL PRIMARY KEY,
password TEXT NOT NULL,
FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
);