CREATE TABLE IF NOT EXISTS raid_builder.raid_group(
	raid_group_id uuid PRIMARY KEY,
	game_id uuid REFERENCES raid_builder.game(game_id) NOT NULL,
	raid_group_name text NOT NULL,
	raid_group_icon text,

	--Auditing
	modified_by uuid,
	modified_date timestamptz,
	created_by uuid NOT NULL,
	created_date timestamptz NOT NULL
);

CREATE INDEX idx_raid_group_game_id ON raid_builder.raid_group(game_id);
CREATE INDEX idx_raid_group_raid_group_name ON raid_builder.raid_group(raid_group_name);

GRANT ALL ON TABLE raid_builder.raid_group TO raid_builder;
