fix table count test in common tests, inc version for dev release, add extra tests...
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Oracle.pm
index 63b9976..b362d0e 100644 (file)
@@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI';
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.04999_03';
+our $VERSION = '0.04999_11';
 
 =head1 NAME
 
@@ -78,14 +78,14 @@ sub _table_uniq_info {
 
     my $sth = $dbh->prepare_cached(
         q{
-            SELECT constraint_name, ucc.column_name
-            FROM user_constraints JOIN user_cons_columns ucc USING (constraint_name)
-            WHERE ucc.table_name=? AND constraint_type='U'
-            ORDER BY ucc.position
+            SELECT constraint_name, acc.column_name
+            FROM all_constraints JOIN all_cons_columns acc USING (constraint_name)
+            WHERE acc.table_name=? and acc.owner = ? AND constraint_type='U'
+            ORDER BY acc.position
         },
         {}, 1);
 
-    $sth->execute(uc $table);
+    $sth->execute(uc $table,$self->{db_schema} );
     my %constr_names;
     while(my $constr = $sth->fetchrow_arrayref) {
         my $constr_name = lc $constr->[0];
@@ -131,8 +131,8 @@ sub _extra_column_info {
     my $sth = $dbh->prepare_cached(
         q{
             SELECT COUNT(*)
-            FROM user_triggers ut JOIN user_trigger_cols utc USING (trigger_name)
-            WHERE utc.table_name = ? AND utc.column_name = ?
+            FROM all_triggers ut JOIN all_trigger_cols atc USING (trigger_name)
+            WHERE atc.table_name = ? AND atc.column_name = ?
             AND column_usage LIKE '%NEW%' AND column_usage LIKE '%OUT%'
             AND trigger_type = 'BEFORE EACH ROW' AND triggering_event LIKE '%INSERT%'
         },
@@ -153,9 +153,12 @@ L<DBIx::Class::Schema::Loader::DBI>
 
 =head1 AUTHOR
 
-TSUNODA Kazuya C<drk@drk7.jp>
+See L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
 
-Dagfinn Ilmari MannsÃ¥ker C<ilmari@ilmari.org>
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
 
 =cut