Fix Oracle constraint detection for non-owned schemas
Dagfinn Ilmari Mannsåker [Sun, 8 Jun 2008 13:18:48 +0000 (13:18 +0000)]
Changes
lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm

diff --git a/Changes b/Changes
index 020a11b..a3320c3 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension DBIx::Class::Schema::Loader
 
+0.04006 Not Yet Released
+        - Fix Oracle constraint detection for non-owned schemas (RT #35732)
+
 0.04005 Sat Apr 05, 2008
         - Fix DB2 support
         - Add support for load_namespaces-style class layout
index 88982b9..102a401 100644 (file)
@@ -80,10 +80,10 @@ 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 constraint_type='U'
+            ORDER BY acc.position
         },
         {}, 1);