Add databse upgrade script for 2.3.2

This commit is contained in:
jekkos-t520
2015-02-03 16:39:15 +01:00
parent bd763596b9
commit 46cfe0b18a
3 changed files with 21 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('barcode_content', 'id'),
('barcode_first_row', 'category'),
('barcode_second_row', 'item_code'),
('barcode_third_row', 'cost_price'),
('barcode_num_in_row', '2'),
('barcode_page_width', '100'),
('barcode_page_cellspacing', '20');
INSERT 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)
(SELECT CONCAT('receivings_', location_name), 'receivings', location_id FROM ospos_stock_locations);

View File

@@ -40,12 +40,6 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
INSERT INTO `ospos_permissions` (permission_id, module_id, location_id)
(SELECT CONCAT('items_', location_name), 'items', location_id FROM ospos_stock_locations);
INSERT 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)
(SELECT CONCAT('receivings_', location_name), 'receivings', location_id FROM ospos_stock_locations);
CREATE TABLE `ospos_grants` (
`permission_id` varchar(255) NOT NULL,
`person_id` int(10) NOT NULL,
@@ -88,8 +82,6 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('tax_included', '0'),
('recv_invoice_format', '$CO'),
('sales_invoice_format', '$CO'),
('barcode_content', 'id'),
('barcode_labels', '');
-- add invoice_number column to receivings table
ALTER TABLE `ospos_receivings`

View File

@@ -41,7 +41,12 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('sales_invoice_format', '$CO'),
('tax_included', '0'),
('barcode_content', 'id'),
('barcode_labels', '');
('barcode_first_row', 'category'),
('barcode_second_row', 'item_code'),
('barcode_third_row', 'cost_price'),
('barcode_num_in_row', '2'),
('barcode_page_width', '100'),
('barcode_page_cellspacing', '20');
-- --------------------------------------------------------