mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-19 23:11:44 -04:00
Drop location column after migration
This commit is contained in:
1 parent
7b8a7033a1
commit
4c763ea9c0
1 file changed
+1
@@ -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;
|
||||
Reference in new issue
Block a user