From 016ad5f22e6f0d1d46ac41e323665724ae2f9008 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 20 Apr 2015 09:11:02 +0200 Subject: [PATCH] Bug 13790: [QA Follow-up] Relocation of db revision in updatedatabase The db rev lines should not be under the bug 13068 sandbox section. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 991b7b05f8..a27bc66fae 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10154,20 +10154,7 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -# DEVELOPER PROCESS, search for anything to execute in the db_update directory -# SEE bug 13068 -# if there is anything in the atomicupdate, read and execute it. - -my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -opendir( my $dirh, $update_dir ); -while ( my $file = readdir $dirh ) { - next unless $file =~ /\.sql$/; # skip non SQL files - print "DEV atomic update : $file \n"; - my $installer = C4::Installer->new(); - my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; -} - -$DBversion = "XXX"; +$DBversion = "3.19.00.XXX"; if(CheckVersion($DBversion)) { $dbh->do(q{ ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST @@ -10191,7 +10178,20 @@ if(CheckVersion($DBversion)) { print "Upgrade to $DBversion done (Bug 13790 - Add unique id issue_id to issues and oldissues tables)\n"; SetVersion($DBversion); +} + +# DEVELOPER PROCESS, search for anything to execute in the db_update directory +# SEE bug 13068 +# if there is anything in the atomicupdate, read and execute it. + +my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; +opendir( my $dirh, $update_dir ); +while ( my $file = readdir $dirh ) { + next unless $file =~ /\.sql$/; # skip non SQL files + print "DEV atomic update : $file \n"; + my $installer = C4::Installer->new(); + my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; } =head1 FUNCTIONS -- 2.39.5