DROP TABLE IF EXISTS item_levels_override;
CREATE TABLE item_levels_override (
	id                   INTEGER PRIMARY KEY,
	item_id              INTEGER NOT NULL DEFAULT 0,
	adventure_class_id   INTEGER NOT NULL DEFAULT 0,
	tradeskill_class_id  INTEGER NOT NULL DEFAULT 0,
	level                INTEGER NOT NULL DEFAULT 1,
	UNIQUE(item_id, adventure_class_id, tradeskill_class_id),
	FOREIGN KEY (item_id) REFERENCES items(id) ON DELETE CASCADE ON UPDATE CASCADE
);
