remove old stacks

This commit is contained in:
2023-09-11 20:12:49 +02:00
parent 205eae2264
commit 4c850f6c0b
174 changed files with 30 additions and 13842 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE trips_items_tmp (
item_id VARCHAR(36) NOT NULL,
trip_id VARCHAR(36) NOT NULL,
pick BOOLEAN NOT NULL,
pack BOOLEAN NOT NULL,
ready BOOLEAN NOT NULL,
new BOOLEAN NOT NULL,
PRIMARY KEY (item_id, trip_id),
FOREIGN KEY(item_id) REFERENCES "inventory_items" (id),
FOREIGN KEY(trip_id) REFERENCES "trips" (id)
);
INSERT INTO trips_items_tmp SELECT *, true as ready FROM trips_items;
DROP TABLE trips_items;
ALTER TABLE "trips_items_tmp" RENAME TO trips_items;