From b451ac8f1aca15edaaf00f1bd0256b1ba35ba726 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 1 Feb 2018 14:30:53 -0300 Subject: [PATCH] Bug 4078: Update DB entry - add new column currency.p_sep_by_space Signed-off-by: Kyle M Hall Signed-off-by: Josef Moravec --- installer/data/mysql/atomicupdate/bug_4078.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_4078.perl diff --git a/installer/data/mysql/atomicupdate/bug_4078.perl b/installer/data/mysql/atomicupdate/bug_4078.perl new file mode 100644 index 0000000..0aa414f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_4078.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'currency', 'p_sep_by_space' ) ) { + $dbh->do( "ALTER TABLE currency ADD COLUMN p_sep_by_space tinyint(1) default 0 after archived" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 4078: Add column currency.p_sep_by_space)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8151a29..aa8f78f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -458,6 +458,7 @@ CREATE TABLE `currency` ( `rate` float(15,5) default NULL, `active` tinyint(1) default NULL, `archived` tinyint(1) DEFAULT 0, + `p_sep_by_space` tinyint(1) DEFAULT 0, PRIMARY KEY (`currency`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- 2.1.4