$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} || [] };
is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{on_update}, 'CASCADE',
"on_update => 'CASCADE' on belongs_to by default";
- ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}),
- 'belongs_to does not have is_deferrable');
+ is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}, 1,
+ "is_deferrable => 1 on belongs_to by default";
ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{cascade_delete}),
'belongs_to does not have cascade_delete');
# 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;
# 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);