From 9440c5f2cb974aa63b4791a060e06ba6aa81ef51 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 16 Jan 2018 16:14:49 +0000 Subject: [PATCH] Bug 13560 - Database changes Signed-off-by: Victor Grousset Signed-off-by: Chris Cormack --- installer/data/mysql/atomicupdate/bug13560.perl | 6 ++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug13560.perl diff --git a/installer/data/mysql/atomicupdate/bug13560.perl b/installer/data/mysql/atomicupdate/bug13560.perl new file mode 100644 index 0000000000..81e39bc0b5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug13560.perl @@ -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"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 909eda25aa..2c351ba44f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3565,7 +3565,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, -- 2.11.0