Games tab on admin page working
This commit is contained in:
11
db/1.0.0/5. createGame.sql
Normal file
11
db/1.0.0/5. createGame.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS raid_builder.game(
|
||||
game_id uuid PRIMARY KEY,
|
||||
game_name text UNIQUE NOT NULL,
|
||||
game_icon text,
|
||||
modified_by uuid,
|
||||
modified_date timestamptz,
|
||||
created_by uuid NOT NULL,
|
||||
created_date timestamptz NOT NULL
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE raid_builder.game TO raid_builder;
|
||||
17
db/1.0.0/6. createGamePermission.sql
Normal file
17
db/1.0.0/6. createGamePermission.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
CREATE TYPE raid_builder.game_permission_type AS ENUM ( 'ADMIN' );
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS raid_builder.game_permission(
|
||||
game_permission_id uuid PRIMARY KEY,
|
||||
account_id uuid REFERENCES raid_builder.account(account_id) NOT NULL,
|
||||
game_id uuid REFERENCES raid_builder.game(game_id) NOT NULL,
|
||||
game_permission_type raid_builder.game_permission_type NOT NULL,
|
||||
|
||||
--Auditing
|
||||
modified_by uuid REFERENCES raid_builder.account(account_id) NOT NULL,
|
||||
modified_date timestamptz NOT NULL,
|
||||
created_by uuid REFERENCES raid_builder.account(account_id) NOT NULL,
|
||||
created_date timestamptz NOT NULL
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE raid_builder.game_permission TO raid_builder;
|
||||
Reference in New Issue
Block a user