Files
opensourcepos/database/2.3_migrate_locations.sql
jekkos-t520 a61bc10dde Location column is kept in database
Added a data migration script for stock_locations and item_quantities tables
2014-08-17 00:49:48 +02:00

3 lines
392 B
SQL

INSERT INTO ospos_stock_locations (location_name) (SELECT 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);