aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2016-07-01 11:30:40 -0400
committerGitHub <noreply@github.com>2016-07-01 11:30:40 -0400
commit4abd389ef77cf8f8b45793451c6d4429ca08062e (patch)
tree89930d89f7a22d07010207d78721ff136b782c17 /activerecord/lib/active_record/connection_adapters/postgresql
parent297e262035ce9dce9c33f8bebc778f36760a5e40 (diff)
parent7b7b7c5ce62e1ede29dad4ae1ce613bd12f8089c (diff)
downloadrails-4abd389ef77cf8f8b45793451c6d4429ca08062e.tar.gz
rails-4abd389ef77cf8f8b45793451c6d4429ca08062e.tar.bz2
rails-4abd389ef77cf8f8b45793451c6d4429ca08062e.zip
Merge pull request #25307 from kamipo/extract_foreign_key_action_from_information_schema
Extract foreign key action from `information_schema`
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
index f6860b9aba..45507e206a 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -579,7 +579,7 @@ module ActiveRecord
end
def foreign_keys(table_name)
- fk_info = select_all <<-SQL.strip_heredoc
+ fk_info = select_all(<<-SQL.strip_heredoc, 'SCHEMA')
SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
FROM pg_constraint c
JOIN pg_class t1 ON c.conrelid = t1.oid