Bug 13560: Database changes
authorNick Clemens <nick@bywatersolutions.com>
Tue, 16 Jan 2018 16:14:49 +0000 (16:14 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 19 Jul 2018 17:22:04 +0000 (17:22 +0000)
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug13560.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql

diff --git a/installer/data/mysql/atomicupdate/bug13560.perl b/installer/data/mysql/atomicupdate/bug13560.perl
new file mode 100644 (file)
index 0000000..81e39bc
--- /dev/null
@@ -0,0 +1,6 @@
+$DBversion = 'XXX';  # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do( "ALTER TABLE marc_modification_template_actions CHANGE action action ENUM('delete_field','add_field','update_field','move_field','copy_field','copy_and_replace_field')" );
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 13560 - need an add option in marc modification templates)\n";
+}
index 34545d0..bd258e7 100644 (file)
@@ -3568,7 +3568,7 @@ CREATE TABLE IF NOT EXISTS marc_modification_template_actions (
   mmta_id int(11) NOT NULL AUTO_INCREMENT,
   template_id int(11) NOT NULL,
   ordering int(3) NOT NULL,
-  action ENUM('delete_field','update_field','move_field','copy_field','copy_and_replace_field') NOT NULL,
+  action ENUM('delete_field','add_field','update_field','move_field','copy_field','copy_and_replace_field') NOT NULL,
   field_number smallint(6) NOT NULL DEFAULT '0',
   from_field varchar(3) NOT NULL,
   from_subfield varchar(1) DEFAULT NULL,