Deleting the table in END {} after having disconnected isn't going to
work. Instead, take advantage of PostgreSQL's transactional DDL
support, and do the tests inside a transcation that is rolled back at
the end.
* Call all diff methods in list context (it can be merged later)
* Fix Pg diff issue with drop constraint on primary keys
* SQLite support for SET NULL, SET DEFAULT and NO ACTION in FK clauses
+* Clean up properly after Parser::DBI::PostgreSQL tests
# ----------------------------------------------------------
# 0.11016 2012-10-09
$| = 1;
+$dbh->begin_work;
$dbh->do($sql);
my $t = SQL::Translator->new(
my $t2_c1 = shift @t2_constraints;
is( $t2_c1->type, FOREIGN_KEY, "Constraint is a FK" );
+$dbh->rollback;
$dbh->disconnect;
} # end of SKIP block
-END {
- if ($dbh) {
- for (
- 'drop table if exists sqlt_test2',
- 'drop table if exists sqlt_test1',
- 'drop table if exists sqlt_products_1',
- ) {
- local $SIG{__WARN__} = sub {};
- eval { $dbh->do($_) };
- }
- }
-}