From e940c1e99d6ef69e8e2f0ea9df923592856b69a1 Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Thu, 24 Aug 2017 12:31:21 +0400 Subject: [PATCH] Increase acceptable length of custom fields and allow null values Currently the maximum length of these custom fields is 25 characters. It's not too difficult to imagine a case in which this is far too little. Also, currently none of the fields are allowed to remain null, which for most uses doesn't make sense as every item wont necessarily have all the fields populated. --- database/3.0.2_to_3.1.0.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/database/3.0.2_to_3.1.0.sql b/database/3.0.2_to_3.1.0.sql index 1c1f7ef40..87209a7e7 100644 --- a/database/3.0.2_to_3.1.0.sql +++ b/database/3.0.2_to_3.1.0.sql @@ -396,3 +396,18 @@ ALTER TABLE ospos_suppliers CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_c ALTER TABLE ospos_tax_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE ospos_tax_code_rates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE ospos_tax_codes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; + +-- +-- Increase acceptable length of custom fields and allow null values +-- +ALTER TABLE ospos_items +MODIFY custom1 VARCHAR(255) DEFAULT NULL, +MODIFY custom2 VARCHAR(255) DEFAULT NULL, +MODIFY custom3 VARCHAR(255) DEFAULT NULL, +MODIFY custom4 VARCHAR(255) DEFAULT NULL, +MODIFY custom5 VARCHAR(255) DEFAULT NULL, +MODIFY custom6 VARCHAR(255) DEFAULT NULL, +MODIFY custom7 VARCHAR(255) DEFAULT NULL, +MODIFY custom8 VARCHAR(255) DEFAULT NULL, +MODIFY custom9 VARCHAR(255) DEFAULT NULL, +MODIFY custom10 VARCHAR(255) DEFAULT NULL;