DROP TABLE IF EXISTS character_social;
CREATE TABLE character_social (
	id      INTEGER PRIMARY KEY,
	char_id INTEGER NOT NULL DEFAULT 0,
	name    TEXT    NOT NULL DEFAULT '',
	type    TEXT    NOT NULL DEFAULT 'FRIEND',
	UNIQUE(char_id, name, type),
	FOREIGN KEY (char_id) REFERENCES characters(id) ON DELETE CASCADE ON UPDATE CASCADE
);
