From feef4dca615f731f457b845413e023f0d1e27ef2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 24 Feb 2020 13:45:30 +0000 Subject: [PATCH] Bug 24131: (follow-up) Another rebase Signed-off-by: Bernardo Gonzalez Kriegel Tested loading 19.11 database, then running updatedatabase.pl on cli, or using webinstaller. Looks better on cli :) --- installer/data/mysql/updatedatabase.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bb8bdf92fc..44394422d2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20885,8 +20885,7 @@ if( CheckVersion( $DBversion ) ) { $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system'); } - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n"; + NewVersion( $DBversion, 17702, 'Add column account_credit_types.archived'); } $DBversion = '19.12.00.030'; @@ -20907,17 +20906,20 @@ if( CheckVersion( $DBversion ) ) { my ($opacheader) = $dbh->selectrow_array( q| SELECT value FROM systempreferences WHERE variable='opacheader'; |); + + my @detail; if( $opacheader ){ foreach my $lang ( @langs ) { - print "Inserting opacheader contents into $lang news item...\n"; # If there is a value in the opacheader preference, insert it into opac_news $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader); + push @detail, "Inserted opacheader contents into $lang news item...\n"; } } # Remove the opacheader system preference $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'"); - SetVersion ($DBversion); - print "Upgrade to $DBversion done (Bug 22880: Move contents of opacheader preference to Koha news system)\n"; + + unshift @detail, 'Move contents of opacheader preference to Koha news system'; + NewVersion( $DBversion, 22880, \@detail); } $DBversion = '19.12.00.031'; -- 2.17.1