CREATE TABLE raid_builder.person_character(
	person_character_id uuid PRIMARY KEY,
	person_id uuid REFERENCES raid_builder.person(person_id) NOT NULL,
	game_class_id uuid REFERENCES raid_builder.game_class(game_class_id) NOT NULL,
	character_name text NOT NULL,
	character_rating int,
	character_comments text,

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

CREATE INDEX idx_person_character_person_id ON raid_builder.person_character(person_id);
CREATE INDEX idx_person_character_game_class_id ON raid_builder.person_character(game_class_id);
CREATE INDEX idx_person_character_character_name ON raid_builder.person_character(character_name);
CREATE INDEX idx_person_character_character_rading ON raid_builder.person_character(character_rating);

GRANT ALL ON TABLE raid_builder.person_character TO raid_builder;
