DROP TABLE IF EXISTS character_titles;
CREATE TABLE character_titles (
	id       INTEGER PRIMARY KEY,
	char_id  INTEGER NOT NULL DEFAULT 0,
	title_id INTEGER NOT NULL DEFAULT 0,
	FOREIGN KEY (char_id) REFERENCES characters(id) ON DELETE CASCADE ON UPDATE CASCADE
);
CREATE INDEX idx_character_titles_char_id ON character_titles(char_id);
