From 8e8713d1b08a36ecb5431cffc4c1f05e6b36a51b Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Thu, 24 Aug 2017 23:33:25 +0400 Subject: [PATCH 1/2] add missing keys delete dropped key added several missing keys to app_config deleted one key that was removed from the app at some point --- database/3.0.2_to_3.1.0.sql | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/database/3.0.2_to_3.1.0.sql b/database/3.0.2_to_3.1.0.sql index b5572de88..5c1f74b15 100644 --- a/database/3.0.2_to_3.1.0.sql +++ b/database/3.0.2_to_3.1.0.sql @@ -308,10 +308,20 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('gcaptcha_secret_key', ''), ('gcaptcha_site_key', ''); --- add Barcode formats +-- add Barcode formats and other missing keys INSERT INTO `ospos_app_config` (`key`, `value`) VALUES -('barcode_formats', '[]'); +('barcode_formats', '[]'), +('barcode_font', 'Arial'), +('barcode_font_size', '10'), +('barcode_height', '50'), +('barcode_quality', '100'), +('barcode_type', 'Code39'), +('barcode_width', '250'), +('cash_decimals', '2'), +('cash_rounding_code', '0'), +('client_id', ''), +('receiving_calculate_average_price', '0'); -- replace old tokens in ospos_app_config @@ -351,6 +361,8 @@ DROP TABLE `ospos_sales_suspended_payments`, `ospos_sales_suspended_items_taxes` -- General fixing to realign upgraded database to clean database structure -- +DELETE FROM `ospos_app_config` WHERE `key` = 'print_after_sale'; + ALTER TABLE ospos_giftcards ADD record_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; ALTER TABLE ospos_giftcards MODIFY value decimal(15,2) NOT NULL; ALTER TABLE ospos_items MODIFY cost_price decimal(15,2) NOT NULL; From 93d00f06b3394f53b65ae38f005cf07b198f874c Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Fri, 25 Aug 2017 11:52:27 +0400 Subject: [PATCH 2/2] removed the addition of client_id to app_config this field is added automatically and not needed to be added by the update script. --- database/3.0.2_to_3.1.0.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/database/3.0.2_to_3.1.0.sql b/database/3.0.2_to_3.1.0.sql index 5c1f74b15..444d17d61 100644 --- a/database/3.0.2_to_3.1.0.sql +++ b/database/3.0.2_to_3.1.0.sql @@ -320,7 +320,6 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('barcode_width', '250'), ('cash_decimals', '2'), ('cash_rounding_code', '0'), -('client_id', ''), ('receiving_calculate_average_price', '0'); -- replace old tokens in ospos_app_config