-- Undo the expand_items migration -- Drop crafting tables DROP INDEX IF EXISTS idx_crafting_recipe_items_item; DROP TABLE IF EXISTS crafting_recipe_items; DROP INDEX IF EXISTS idx_crafting_recipes_workbench; DROP INDEX IF EXISTS idx_crafting_recipes_level; DROP INDEX IF EXISTS idx_crafting_recipes_skill; DROP INDEX IF EXISTS idx_crafting_recipes_product; DROP TABLE IF EXISTS crafting_recipes; -- Drop item indexes DROP INDEX IF EXISTS idx_items_skill; DROP INDEX IF EXISTS idx_items_price; DROP INDEX IF EXISTS idx_items_level; DROP INDEX IF EXISTS idx_items_type; -- Note: SQLite doesn't support DROP COLUMN in ALTER TABLE -- To truly revert, we'd need to recreate the table without the columns -- For now, we'll leave the columns in place (they won't hurt with defaults) -- If you need a full revert, you'd need to: -- 1. CREATE TABLE items_backup (id, name, data) -- 2. INSERT INTO items_backup SELECT id, name, data FROM items -- 3. DROP TABLE items -- 4. ALTER TABLE items_backup RENAME TO items