use warnings;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies;
use DBIx::Class::Schema::Loader 'make_schema_at';
use DBIx::Class::Schema::Loader::Utils qw/slurp_file split_name/;
use Try::Tiny;
},
],
drop => [qw/oracle_loader_test1 oracle_loader_test9 oracle_loader_test10/],
- count => 7 + 30 * 2,
+ count => 7 + 31 * 2,
run => sub {
my ($monikers, $classes);
($schema, $monikers, $classes) = @_;
'DEFERRABLE clause introspected correctly';
SKIP: {
- skip 'Set the DBICTEST_ORA_EXTRAUSER_DSN, _USER and _PASS environment variables to run the cross-schema relationship tests', 6 * 2
+ skip 'Set the DBICTEST_ORA_EXTRAUSER_DSN, _USER and _PASS environment variables to run the cross-schema relationship tests', 31 * 2
unless $ENV{DBICTEST_ORA_EXTRAUSER_DSN};
$extra_schema = $schema->clone;
)
EOF
- $dbh1->do($_) for $auto_inc_cb->('oracle_loader_test4', 'id');
+ $dbh1->do($_) for $auto_inc_cb->(lc "${schema1}.oracle_loader_test4", 'id');
$dbh1->do("GRANT ALL ON oracle_loader_test4 TO $schema2");
$dbh1->do("GRANT ALL ON oracle_loader_test4_id_seq TO $schema2");
is try { $rsrc->column_info('id')->{is_auto_increment} }, 1,
'column in schema1';
+ is try { $rsrc->column_info('id')->{sequence} }, lc "${schema1}.oracle_loader_test4_id_seq",
+ 'sequence in schema1';
+
is try { $rsrc->column_info('value')->{data_type} }, 'varchar2',
'column in schema1';
if( !$dsn || !$user ) {
$tester->skip_tests('You need to set the DBICTEST_ORA_DSN, _USER, and _PASS environment variables');
}
+elsif (!DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_oracle')) {
+ $tester->skip_tests('You need to install ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_oracle'));
+}
else {
$tester->run_tests();
}