open $fh, "<$file" or warn("Can't open upgrade file, $file ($!)");
my @data = split(/;\n/, join('', <$fh>));
close($fh);
- @data = grep { $_ && $_ !~ /^-- / } @data;
- @data = grep { $_ !~ /^(BEGIN TRANACTION|COMMIT)/m } @data;
+ @data = grep { $_ && $_ !~ /^\s*$/s && $_ !~ /^-- / } @data;
$self->_filedata(\@data);
next if($line =~ /^--/);
next if(!$line);
# next if($line =~ /^DROP/m);
- next if($line =~ /^BEGIN TRANSACTION/m);
- next if($line =~ /^COMMIT/m);
+ next if($line =~ /^BEGIN(?: TRANSACTION)?/im);
+ next if($line =~ /^COMMIT/mi);
next if $line =~ /^\s+$/; # skip whitespace only
$self->_query_start($line);
eval {