CREATE TABLE raid_builder.raid_group_request(
	raid_group_request_id uuid PRIMARY KEY,
	raid_group_id uuid REFERENCES raid_builder.raid_group(raid_group_id) NOT NULL,
	account_id uuid REFERENCES raid_builder.account(account_id) NOT NULL,
	request_message text,

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

CREATE INDEX idx_raid_group_request_raid_group_id ON raid_builder.raid_group_request(raid_group_id);
CREATE INDEX idx_raid_group_request_account_id ON raid_builder.raid_group_request(account_id);

GRANT ALL ON TABLE raid_builder.raid_group_request TO raid_builder;