From a1525b297fc80cef5a041f05aa20da54a52534d8 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Tue, 11 Dec 2012 08:29:11 -0500 Subject: [PATCH] Bug 9191 follow-up: remove example updatedatabase stanzas The patch for bug 9191 included example updatedatabase stanzas that require removal before pushing. This patch also updates the 00-checkdatabase-version.t test so that it will not give false-positives. --- installer/data/mysql/updatedatabase.pl | 11 ----------- t/00-checkdatabase-version.t | 7 ++++++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9c13b82935..39e4bde404 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6181,17 +6181,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } -if ( CheckVersion($DBversion) ) { - print "Upgrade to $DBversion done (Bug 9191: You shouldn't see this)\n"; - SetVersion($DBversion); -} - -$DBversion = "3.11.00.XXX"; -if ( CheckVersion($DBversion) ) { - print "Upgrade to $DBversion done (Bug 9191: You should see this)\n"; - SetVersion($DBversion); -} - =head1 FUNCTIONS =head2 TableExists($table) diff --git a/t/00-checkdatabase-version.t b/t/00-checkdatabase-version.t index 3a3df52b24..8bb3661fe3 100644 --- a/t/00-checkdatabase-version.t +++ b/t/00-checkdatabase-version.t @@ -38,7 +38,12 @@ foreach my $file (@files){ $line++; if (/XXX/i) { #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum) - next if $file=~ /updatedatabase/ && ( /s\/XXX\$\/999\/;/ || /\$_\[0\]=~ \/XXX\$\/;/ ); + next + if $file =~ /updatedatabase/ + && ( /s\/XXX\$\/999\/;/ + || /\$_\[0\]=~ \/XXX\$\/;/ + || /version contains XXX/ + || /\$proposed_version =~ m\/XXX\// ); $xxx_found = 1; last; } -- 2.20.1