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,
	modified_date timestamptz,
	created_by uuid NOT NULL,
	created_date timestamptz NOT NULL
);

GRANT ALL ON TABLE raid_builder.game_permission TO raid_builder;
