From 711be8696db2c71126c966e8905d89de932ad1ee Mon Sep 17 00:00:00 2001 From: James, Mason Date: Thu, 21 Jul 2011 03:27:13 +1200 Subject: [PATCH] [SIGNED-OFF] Bug 6428 Follow up: db rev for coded_location_qualifier Content-Type: text/plain; charset="utf-8" Clears kohafield for 952f (items.coded_location_qualifier). Signed-off-by: Marcel de Rooy Corrected a typo that made the SQL statement fail (missing single quote before fieldname). Tested it on 3.05.00.007. Will work. I already had this connection for 952f removed long ago. If it still would have been there, it will be gone now! --- installer/data/mysql/updatedatabase.pl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2076edf..7f0223f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4391,6 +4391,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.xxx"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE marc_subfield_structure SET kohafield = NULL WHERE tagfield = 952 AND tagsubfield = 'f' AND kohafield = 'items.coded_location_qualifier'"); + print "Upgrade to $DBversion done (remove non-existant 'items.coded_location_qualifier' column)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6