Database init script now creates accounts table
parent
64026a791e
commit
9c9c106acd
|
@ -22,10 +22,7 @@ scores:
|
||||||
accounts:
|
accounts:
|
||||||
|
|
||||||
users:
|
users:
|
||||||
*user_id* | email | salt | password_hash | role | approved
|
*user_id* | email | password | admin
|
||||||
|
|
||||||
sessions:
|
|
||||||
*session_id* | ~user_id~ | expiration_date
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -102,4 +99,13 @@ CREATE TABLE IF NOT EXISTS scores.games(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE SCHEMA IF NOT EXISTS accounts;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS accounts.users(
|
||||||
|
user_id BIGINT GENERATED ALWAYS AS IDENTITY,
|
||||||
|
email TEXT UNIQUE NOT NULL,
|
||||||
|
password TEXT NOT NULL,
|
||||||
|
admin BOOLEAN NOT NULL DEFAULT FALSE
|
||||||
|
);
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
Reference in New Issue