From: Marcel de Rooy Date: Mon, 9 Oct 2017 10:51:34 +0000 (+0200) Subject: Bug 19043: (QA follow-up) Add update DB entry and print warning X-Git-Tag: v17.11.00~339 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=ecc5daaceb3c2bb4ea9be2860b839c1686eee2d8;p=koha-ffzg.git Bug 19043: (QA follow-up) Add update DB entry and print warning This follow-up takes care of the requested warning at upgrade time. At the same time it removes the obsolete Columbia record when host and port are equal to the formerly used values. Note that the new host for on-campus use has been changed. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- diff --git a/installer/data/mysql/atomicupdate/bug19043.perl b/installer/data/mysql/atomicupdate/bug19043.perl new file mode 100644 index 0000000000..807e2bf48f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug19043.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + my $where = q|host='clio-db.cc.columbia.edu' AND port=7090|; + my $sql = "SELECT COUNT(*) FROM z3950servers WHERE $where"; + my ( $cnt ) = $dbh->selectrow_array( $sql ); + if( $cnt ) { + $dbh->do( "DELETE FROM z3950servers WHERE $where" ); + print "Removed $cnt Z39.50 target(s) for Columbia University\n"; + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19043 - Z39.50 target for Columbia University is no longer publicly available.)\n"; +}