[Bast-commits] r5408 - in DBIx-Class-Fixtures/1.001/trunk: .
lib/DBIx/Class
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Wed Feb 4 11:43:10 GMT 2009
Author: lukes
Date: 2009-02-04 11:43:10 +0000 (Wed, 04 Feb 2009)
New Revision: 5408
Modified:
DBIx-Class-Fixtures/1.001/trunk/MANIFEST
DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm
Log:
use deferred fk checks also for dropping tables
Modified: DBIx-Class-Fixtures/1.001/trunk/MANIFEST
===================================================================
--- DBIx-Class-Fixtures/1.001/trunk/MANIFEST 2009-02-03 14:57:02 UTC (rev 5407)
+++ DBIx-Class-Fixtures/1.001/trunk/MANIFEST 2009-02-04 11:43:10 UTC (rev 5408)
@@ -15,8 +15,6 @@
lib/DBIx/Class/Fixtures/DBI/mysql.pm
lib/DBIx/Class/Fixtures/DBI/Pg.pm
lib/DBIx/Class/Fixtures/Schema.pm
-lib/DBIx/Class/Fixtures/SchemaVersioned.pm
-lib/DBIx/Class/Fixtures/Versioned.pm
Makefile.PL
MANIFEST This list of files
META.yml
Modified: DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm
===================================================================
--- DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm 2009-02-03 14:57:02 UTC (rev 5407)
+++ DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm 2009-02-04 11:43:10 UTC (rev 5408)
@@ -713,10 +713,11 @@
# clear existing db
$self->msg("- clearing DB of existing tables");
- eval { $dbh->do('SET foreign_key_checks=0') };
- foreach my $table (@tables) {
- eval { $dbh->do('drop table ' . $table . ($params->{cascade} ? ' cascade' : '') ) };
- }
+ $pre_schema->storage->with_deferred_fk_checks(sub {
+ foreach my $table (@tables) {
+ eval { $dbh->do('drop table ' . $table . ($params->{cascade} ? ' cascade' : '') ) };
+ }
+ });
# import new ddl file to db
my $ddl_file = $params->{ddl};
More information about the Bast-commits
mailing list