From 4a670a30272dd5933134766274be23b31dd56c87 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 18 Dec 2019 11:44:14 +0100 Subject: [PATCH] Bug 20352: DB changes Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_20352.perl | 13 +++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20352.perl diff --git a/installer/data/mysql/atomicupdate/bug_20352.perl b/installer/data/mysql/atomicupdate/bug_20352.perl new file mode 100644 index 0000000000..8819d8b2cf --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20352.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'currency', 'p_cs_precedes' ) ) { + $dbh->do(q| + ALTER TABLE currency + ADD COLUMN p_cs_precedes tinyint(1) DEFAULT 1 + AFTER p_sep_by_space + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20352 - Add column currency.p_cs_precedes)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 1cb3165eee..b2e9ccee67 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -446,6 +446,7 @@ CREATE TABLE `currency` ( `active` tinyint(1) default NULL, `archived` tinyint(1) DEFAULT 0, `p_sep_by_space` tinyint(1) DEFAULT 0, + `p_cs_precedes` tinyint(1) DEFAULT 1, PRIMARY KEY (`currency`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- 2.26.2