From b45e667553f13a0c71a6218fbcf7b170e560a7fd 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 --- 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 0000000000..0aa414f3cf --- /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 f031503ae8..e62d0c1ea1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -488,6 +488,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=utf8 COLLATE=utf8_unicode_ci; -- 2.11.0