Database init script now creates accounts table
parent
64026a791e
commit
9c9c106acd
|
@ -22,10 +22,7 @@ scores:
|
|||
accounts:
|
||||
|
||||
users:
|
||||
*user_id* | email | salt | password_hash | role | approved
|
||||
|
||||
sessions:
|
||||
*session_id* | ~user_id~ | expiration_date
|
||||
*user_id* | email | password | admin
|
||||
|
||||
*/
|
||||
|
||||
|
@ -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;
|
Reference in New Issue