@@ -, +, @@ * apply the patch * create a files with a .sql extension in the db_update directory * run updatedatabase.pl * look at your database, what was in the .sql file must have been run --- installer/data/mysql/updatedatabase.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -8780,6 +8780,27 @@ 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 db_update, read and execute it. + +opendir( my $dirh, C4::Context->config('intranetdir') . '/installer/data/mysql/db_update' ); +my $old_delimiter = $/; +$/ = ';'; +while (readdir $dirh) { + next unless $_ =~ /\.sql$/; # skip non SQL files + # open and read file; + open FILE, "<", C4::Context->config('intranetdir') . '/installer/data/mysql/db_update/'.$_ or die "ERROR, impossible to open $_"; + my $sql_to_execute; + while ( ) { + my $line = $_; + $line =~ s/\n//g; + $dbh->do($line) if $line; + $sql_to_execute .= $line; + } +} + + =head1 FUNCTIONS =head2 TableExists($table) --