DROP TABLE IF EXISTS character_details;
CREATE TABLE character_details (
	id                              INTEGER PRIMARY KEY,
	char_id                         INTEGER NOT NULL DEFAULT 0 UNIQUE,
	hp                              INTEGER NOT NULL DEFAULT 0,
	power                           INTEGER NOT NULL DEFAULT 0,
	savagery                        INTEGER NOT NULL DEFAULT 0,
	dissonance                      INTEGER NOT NULL DEFAULT 0,
	max_concentration               INTEGER NOT NULL DEFAULT 0,
	attack                          INTEGER NOT NULL DEFAULT 0,
	mitigation                      INTEGER NOT NULL DEFAULT 0,
	avoidance                       INTEGER NOT NULL DEFAULT 0,
	parry                           INTEGER NOT NULL DEFAULT 0,
	deflection                      INTEGER NOT NULL DEFAULT 0,
	block                           INTEGER NOT NULL DEFAULT 0,
	str                             INTEGER NOT NULL DEFAULT 0,
	sta                             INTEGER NOT NULL DEFAULT 0,
	agi                             INTEGER NOT NULL DEFAULT 0,
	wis                             INTEGER NOT NULL DEFAULT 0,
	intel                           INTEGER NOT NULL DEFAULT 0,
	heat                            INTEGER NOT NULL DEFAULT 0,
	cold                            INTEGER NOT NULL DEFAULT 0,
	magic                           INTEGER NOT NULL DEFAULT 0,
	mental                          INTEGER NOT NULL DEFAULT 0,
	divine                          INTEGER NOT NULL DEFAULT 0,
	disease                         INTEGER NOT NULL DEFAULT 0,
	poison                          INTEGER NOT NULL DEFAULT 0,
	elemental                       INTEGER NOT NULL DEFAULT 0,
	arcane                          INTEGER NOT NULL DEFAULT 0,
	noxious                         INTEGER NOT NULL DEFAULT 0,
	coin_copper                     INTEGER NOT NULL DEFAULT 0,
	coin_silver                     INTEGER NOT NULL DEFAULT 0,
	coin_gold                       INTEGER NOT NULL DEFAULT 0,
	coin_plat                       INTEGER NOT NULL DEFAULT 0,
	pet_name                        TEXT    NOT NULL DEFAULT 'No Pet',
	status_points                   INTEGER NOT NULL DEFAULT 0,
	max_power                       INTEGER NOT NULL DEFAULT 0,
	max_hp                          INTEGER NOT NULL DEFAULT 0,
	max_savagery                    INTEGER NOT NULL DEFAULT 0,
	max_dissonance                  INTEGER NOT NULL DEFAULT 0,
	xp                              INTEGER NOT NULL DEFAULT 0,
	xp_needed                       INTEGER NOT NULL DEFAULT 0,
	xp_debt                         REAL    NOT NULL DEFAULT 0,
	xp_vitality                     REAL    NOT NULL DEFAULT 0,
	tradeskill_xp                   INTEGER NOT NULL DEFAULT 0,
	tradeskill_xp_needed            INTEGER NOT NULL DEFAULT 0,
	tradeskill_xp_debt              INTEGER NOT NULL DEFAULT 0,
	tradeskill_xp_vitality          REAL    NOT NULL DEFAULT 0,
	bank_copper                     INTEGER NOT NULL DEFAULT 0,
	bank_silver                     INTEGER NOT NULL DEFAULT 0,
	bank_gold                       INTEGER NOT NULL DEFAULT 0,
	bank_plat                       INTEGER NOT NULL DEFAULT 0,
	bind_zone_id                    INTEGER NOT NULL DEFAULT 0,
	bind_x                          REAL    NOT NULL DEFAULT 0,
	bind_y                          REAL    NOT NULL DEFAULT 0,
	bind_z                          REAL    NOT NULL DEFAULT 0,
	bind_heading                    REAL    NOT NULL DEFAULT 0,
	house_zone_id                   INTEGER NOT NULL DEFAULT 0,
	combat_voice                    INTEGER NOT NULL DEFAULT 52,
	emote_voice                     INTEGER NOT NULL DEFAULT 1060,
	biography                       TEXT    NOT NULL DEFAULT '',
	flags                           INTEGER NOT NULL DEFAULT 301465665,
	flags2                          INTEGER NOT NULL DEFAULT 131112,
	prefix_title                    INTEGER NOT NULL DEFAULT -1,
	suffix_title                    INTEGER NOT NULL DEFAULT -1,
	current_language                INTEGER NOT NULL DEFAULT 0,
	last_name                       TEXT    NOT NULL DEFAULT '',
	assigned_aa                     INTEGER NOT NULL DEFAULT 0,
	unassigned_aa                   INTEGER NOT NULL DEFAULT 0,
	tradeskill_aa                   INTEGER NOT NULL DEFAULT 0,
	unassigned_tradeskill_aa        INTEGER NOT NULL DEFAULT 0,
	prestige_aa                     INTEGER NOT NULL DEFAULT 0,
	unassigned_prestige_aa          INTEGER NOT NULL DEFAULT 0,
	tradeskill_prestige_aa          INTEGER NOT NULL DEFAULT 0,
	unassigned_tradeskill_prestige_aa INTEGER NOT NULL DEFAULT 0,
	FOREIGN KEY (char_id) REFERENCES characters(id) ON DELETE CASCADE ON UPDATE CASCADE
);
