[Bast-commits] r3838 -
DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema
captainL at dev.catalyst.perl.org
captainL at dev.catalyst.perl.org
Wed Oct 24 21:42:23 GMT 2007
Author: captainL
Date: 2007-10-24 21:42:22 +0100 (Wed, 24 Oct 2007)
New Revision: 3838
Modified:
DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm
Log:
fixed broken regex when reading sql files
Modified: DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm 2007-10-24 00:55:22 UTC (rev 3837)
+++ DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm 2007-10-24 20:42:22 UTC (rev 3838)
@@ -184,7 +184,7 @@
my $diff = SQL::Translator::Diff::schema_diff($db_tr->schema, $db,
$dbic_tr->schema, $db,
- { ignore_constraint_names => 1, ignore_index_names => 1, caseopt => 1 });
+ { caseopt => 1 });
my $filename = $self->ddl_filename(
$db,
@@ -226,7 +226,9 @@
my $fh;
open $fh, "<$file" or warn("Can't open upgrade file, $file ($!)");
- my @data = split(/[;\n]/, join('', <$fh>));
+ my @data = split(/\n/, join('', <$fh>));
+ @data = grep(!/^--/, @data);
+ @data = split(/;/, join('', @data));
close($fh);
@data = grep { $_ && $_ !~ /^-- / } @data;
@data = grep { $_ !~ /^(BEGIN TRANACTION|COMMIT)/m } @data;
More information about the Bast-commits
mailing list