From e6a9d8437097c00717b2d4f0ed3b89e3170c194d Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 24 Nov 2019 12:39:57 +0000 Subject: [PATCH] Bug 17831: Database update - Tidy up frameworks in existing installations The mapped table and column doesn't exist, so we should also remove it from existing installations. Signed-off-by: Jonathan Druart --- installer/data/mysql/atomicupdate/bug_17831_bibliosubject.perl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_17831_bibliosubject.perl diff --git a/installer/data/mysql/atomicupdate/bug_17831_bibliosubject.perl b/installer/data/mysql/atomicupdate/bug_17831_bibliosubject.perl new file mode 100644 index 0000000000..09b694528a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17831_bibliosubject.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE marc_subfield_structure SET kohafield = NULL WHERE kohafield = 'bibliosubject.subject';" ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17831 - Remove non-existing bibliosubject.subject from frameworks)\n"; +} -- 2.11.0