From: Rafael Kitover Date: Tue, 13 Oct 2009 14:46:22 +0000 (+0000) Subject: patch from Robert Bohne to make _table_uniq_info more correct for Oracle X-Git-Tag: 0.04999_10~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8803e4edc1fc42207406452ed9243413d49d695d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git patch from Robert Bohne to make _table_uniq_info more correct for Oracle --- diff --git a/Changes b/Changes index 180fdca..3be0d31 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - patch from Robert Bohne to make _table_uniq_info more correct for + Oracle + 0.04999_09 2009-10-08 - Only redump the files when something has actually changed - Place a warning at the top of the files saying 'do not modify' to diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm index 7d8150b..e5e96f6 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm @@ -80,12 +80,12 @@ sub _table_uniq_info { q{ 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' + 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];