Skip to content

Commit

Permalink
Take postgres schemas into account when retrieving foreign keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanmcuello committed Mar 13, 2011
1 parent a813df7 commit 5bceeb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/foreigner/connection_adapters/postgresql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def foreign_keys(table_name)
WHERE tc.constraint_type = 'FOREIGN KEY'
AND tc.constraint_catalog = '#{@config[:database]}'
AND tc.table_name = '#{table_name}'
AND tc.table_schema = ANY (current_schemas(false))
}

fk_info.map do |row|
Expand Down

0 comments on commit 5bceeb3

Please sign in to comment.