From 4c763ea9c033e0661bffe7020829d0aa30a321f6 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sat, 26 Aug 2017 20:47:25 +0100 Subject: [PATCH] Drop location column after migration --- database/2.3_migrate_locations.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/database/2.3_migrate_locations.sql b/database/2.3_migrate_locations.sql index 61309e078..77b7daa2a 100644 --- a/database/2.3_migrate_locations.sql +++ b/database/2.3_migrate_locations.sql @@ -1,2 +1,3 @@ INSERT INTO ospos_stock_locations (location_name) (SELECT DISTINCT(location) FROM ospos_items WHERE NOT EXISTS (select location from ospos_stock_locations where location_name = location)); INSERT INTO ospos_item_quantities (item_id, location_id, quantity) (SELECT item_id, location_id, quantity FROM ospos_items, ospos_stock_locations where ospos_items.location = ospos_stock_locations.location_name); +ALTER TABLE ospos_items DROP COLUMN location;