monorepo/visions/server/migrations/02-users/up.sql

17 lines
296 B
MySQL
Raw Normal View History

CREATE TABLE users(
uuid TEXT PRIMARY KEY,
name TEXT,
password TEXT,
admin BOOLEAN,
enabled BOOLEAN
);
CREATE TABLE roles(
user_id TEXT,
game_id TEXT,
role TEXT,
FOREIGN KEY(user_id) REFERENCES users(uuid),
FOREIGN KEY(game_id) REFERENCES games(uuid)
);