mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-04 13:54:51 -04:00
Ignore pre-existing rows
sales_stock and receivings_stock already exist at the point this insert gets run causing the sql to fail. Adding the IGNORE directive causes duplicate entries to be skipped in the insert.
This commit is contained in:
@@ -22,10 +22,10 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('lines_per_page', '25'),
|
||||
('show_total_discount', '25');
|
||||
|
||||
INSERT INTO `ospos_permissions` (permission_id, module_id, location_id)
|
||||
INSERT IGNORE INTO `ospos_permissions` (permission_id, module_id, location_id)
|
||||
(SELECT CONCAT('sales_', location_name), 'sales', location_id FROM ospos_stock_locations);
|
||||
|
||||
INSERT INTO `ospos_permissions` (permission_id, module_id, location_id)
|
||||
INSERT IGNORE INTO `ospos_permissions` (permission_id, module_id, location_id)
|
||||
(SELECT CONCAT('receivings_', location_name), 'receivings', location_id FROM ospos_stock_locations);
|
||||
|
||||
-- add item_pic column to items table
|
||||
|
||||
Reference in New Issue
Block a user