extra => {
create => [
q{
+ CREATE SCHEMA dbicsl_test
+ },
+ q{
+ CREATE SEQUENCE dbicsl_test.myseq
+ },
+ q{
CREATE TABLE pg_loader_test1 (
- id SERIAL NOT NULL PRIMARY KEY,
+ id INTEGER NOT NULL DEFAULT nextval('dbicsl_test.myseq') PRIMARY KEY,
value VARCHAR(100)
)
},
COMMENT ON TABLE pg_loader_test2 IS 'very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long comment'
},
],
+ pre_drop_ddl => [
+ 'DROP SCHEMA dbicsl_test CASCADE',
+ ],
drop => [ qw/ pg_loader_test1 pg_loader_test2 / ],
- count => 3,
+ count => 4,
run => sub {
my ($schema, $monikers, $classes) = @_;
+ is $schema->source($monikers->{pg_loader_test1})->column_info('id')->{sequence},
+ 'dbicsl_test.myseq',
+ 'qualified sequence detected';
+
my $class = $classes->{pg_loader_test1};
my $filename = $schema->_loader->_get_dump_filename($class);
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} || [] }) {
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 {};