$self->drop_extra_tables_only;
my $dbh = $self->dbconnect(1);
- $dbh->do($_) for @{ $self->{extra}{create} || [] };
- $dbh->do($self->{data_type_tests}{ddl}) if $self->{data_type_tests}{ddl};
+ {
+ # Silence annoying but harmless postgres "NOTICE: CREATE TABLE..."
+ local $SIG{__WARN__} = sub {
+ my $msg = shift;
+ warn $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
+ };
+
+
+ $dbh->do($_) for @{ $self->{extra}{create} || [] };
+ $dbh->do($self->{data_type_tests}{ddl}) if $self->{data_type_tests}{ddl};
+ }
$self->{_created} = 1;
my $file_count = grep /CREATE (?:TABLE|VIEW)/i, @{ $self->{extra}{create} || [] };
# Silence annoying but harmless postgres "NOTICE: CREATE TABLE..."
local $SIG{__WARN__} = sub {
my $msg = shift;
- print STDERR $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
+ warn $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
};
$dbh->do($_) for @statements_rescan;
id $self->{auto_inc_pk},
dat VARCHAR(32) NOT NULL,
dat2 VARCHAR(32) NOT NULL,
- set_primary_key INTEGER,
- dbix_class_testcomponent INTEGER,
+ set_primary_key INTEGER $self->{null},
+ dbix_class_testcomponent INTEGER $self->{null},
UNIQUE (dat2, dat)
) $self->{innodb}
},
# Silence annoying but harmless postgres "NOTICE: CREATE TABLE..."
local $SIG{__WARN__} = sub {
my $msg = shift;
- print STDERR $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
+ warn $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
};
$dbh->do($_) for (@statements);