Bug 4078: Update DB entry - add new column currency.p_sep_by_space
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 1 Feb 2018 17:30:53 +0000 (14:30 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Mar 2018 14:45:38 +0000 (11:45 -0300)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/atomicupdate/bug_4078.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql

diff --git a/installer/data/mysql/atomicupdate/bug_4078.perl b/installer/data/mysql/atomicupdate/bug_4078.perl
new file mode 100644 (file)
index 0000000..0aa414f
--- /dev/null
@@ -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";
+}
index 8151a29..aa8f78f 100644 (file)
@@ -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;