Update database initialization script

main
sudoer777 2021-12-01 11:15:13 -07:00
parent 8bf2b8a275
commit dd85df48c5
1 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,7 @@ CREATE TABLE IF NOT EXISTS accounts.users(
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
admin BOOLEAN NOT NULL DEFAULT FALSE,
full_name TEXT NOT NULL,
PRIMARY KEY(user_id)
);
@ -110,4 +111,13 @@ CREATE TABLE IF NOT EXISTS scores.games(
REFERENCES accounts.users(user_id)
);
CREATE TABLE IF NOT EXISTS metadata(
property TEXT UNIQUE NOT NULL,
value TEXT NOT NULL
);
INSERT INTO metadata(property, value)
VALUES("latest_migration", "2");
COMMIT;