$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} || [] };
my @columns_lt2 = $class2->columns;
is_deeply( \@columns_lt2, [ qw/id dat dat2 set_primary_key dbix_class_testcomponent/ ], "Column Ordering" );
- is $class2->column_info('set_primary_key')->{accessor}, 'Set_primary_key',
- 'accessor for column name that conflicts with a result base class method renamed';
+ is $class2->column_info('set_primary_key')->{accessor}, undef,
+ 'accessor for column name that conflicts with a result base class method removed';
- is $class2->column_info('dbix_class_testcomponent')->{accessor}, 'Dbix_class_testcomponent',
- 'accessor for column name that conflicts with a component class method renamed';
+ is $class2->column_info('dbix_class_testcomponent')->{accessor}, undef,
+ 'accessor for column name that conflicts with a component class method removed';
my %uniq1 = $class1->unique_constraints;
my $uniq1_test = 0;
# 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);