From: Ash Berlin Date: Sat, 7 Feb 2009 17:52:29 +0000 (+0000) Subject: Fix versioning test X-Git-Tag: v0.08011~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4587ee7da54e92bc535947bb240fb0aa5b7e945d;p=dbsrgits%2FDBIx-Class.git Fix versioning test --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index ebfe9ac..e5e9da3 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -141,8 +141,7 @@ sub _on_connect 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); diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index b0a4d57..137cc9e 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1513,8 +1513,8 @@ sub deploy { 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 {