X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fdbixcsl_common_tests.pm;h=22dc59dfea161644ef288eefda4cca7bee55b8b7;hb=7b86848108e4505349fa9e1a778ce225fbfddef6;hp=3cf50e586f6a7ec497a1aea44a94493fb44ebad5;hpb=6c2b21a548e7c03424fdd40eab124b44a08077fc;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 3cf50e5..22dc59d 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -155,7 +155,12 @@ sub drop_extra_tables_only { my $self = shift; my $dbh = $self->dbconnect(0); - $dbh->do($_) for @{ $self->{extra}{pre_drop_ddl} || [] }; + + { + local $SIG{__WARN__} = sub {}; # postgres notices + $dbh->do($_) for @{ $self->{extra}{pre_drop_ddl} || [] }; + } + $dbh->do("DROP TABLE $_") for @{ $self->{extra}{drop} || [] }; foreach my $data_type_table (@{ $self->{data_type_tests}{table_names} || [] }) { @@ -1189,7 +1194,7 @@ sub create { dat2 VARCHAR(32) NOT NULL, set_primary_key INTEGER $self->{null}, dbix_class_testcomponent INTEGER $self->{null}, - meta $self->{null}, + meta INTEGER $self->{null}, UNIQUE (dat2, dat) ) $self->{innodb} }, @@ -1715,7 +1720,11 @@ sub drop_tables { my $dbh = $self->dbconnect(0); - $dbh->do($_) for @{ $self->{extra}{pre_drop_ddl} || [] }; + { + local $SIG{__WARN__} = sub {}; # postgres notices + $dbh->do($_) for @{ $self->{extra}{pre_drop_ddl} || [] }; + } + $dbh->do("DROP TABLE $_") for @{ $self->{extra}{drop} || [] }; my $drop_auto_inc = $self->{auto_inc_drop_cb} || sub {};