14 lines
464 B
SQL
14 lines
464 B
SQL
-- Drop the old table
|
|
DROP TABLE world_resources;
|
|
|
|
-- Recreate with simplified structure - no id, no scene_name, no object_name, only 2D coordinates
|
|
CREATE TABLE world_resources (
|
|
item_id INTEGER NOT NULL,
|
|
pos_x REAL NOT NULL,
|
|
pos_y REAL NOT NULL,
|
|
PRIMARY KEY (item_id, pos_x, pos_y)
|
|
) WITHOUT ROWID;
|
|
|
|
CREATE INDEX idx_world_resources_item_id ON world_resources(item_id);
|
|
CREATE INDEX idx_world_resources_position ON world_resources(pos_x, pos_y);
|