From 8e0a7eb8aed9b34d491ccd506d59158ca5e92c1f Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 13 Aug 2014 13:57:58 +0200 Subject: [PATCH] Bug 12754: Add XSLT action to MARC modification templates Content-Type: text/plain; charset=utf-8 This is the dbrev for this report. It adds enum run_xslt for the action column. It adds a new columns run_xslt for the XSLT file to run. Test plan: Upgrade via the webinstaller and check table marc_modification_template_actions. --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index b46dc6a..8e789e4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3383,7 +3383,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') NOT NULL, + action enum('delete_field','update_field','move_field','copy_field','run_xslt') NOT NULL, field_number smallint(6) NOT NULL DEFAULT '0', from_field varchar(3) NOT NULL, from_subfield varchar(1) DEFAULT NULL, @@ -3400,6 +3400,7 @@ CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( conditional_value text, conditional_regex tinyint(1) NOT NULL DEFAULT '0', description text, + run_xslt text, PRIMARY KEY (mmta_id), CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3f1af57..7063207 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8603,6 +8603,18 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } + +$DBversion = "3.17.00.XXX"; ### NOTE TO RM: Please update DBIx schema !!! +if ( CheckVersion($DBversion) ) { + $dbh->do(q| +ALTER TABLE marc_modification_template_actions + MODIFY COLUMN action enum('delete_field','update_field','move_field','copy_field','run_xslt'), + ADD COLUMN run_xslt TEXT + |); + print "Upgrade to $DBversion done (Bug 12754: Add XSLT action to MARC modification templates)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.7.6