Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Query for loading index info should be marked as SCHEMA.

  • Loading branch information...
commit 8933efb9fbcfd67c68d80065873fb381ef9bfc36 1 parent 1b7894c
Toshinori Kajihara kennyj authored
2  activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
View
@@ -111,7 +111,7 @@ def indexes(table_name, name = nil)
inddef = row[3]
oid = row[4]
- columns = Hash[query(<<-SQL, "Columns for index #{row[0]} on #{table_name}")]
+ columns = Hash[query(<<-SQL, "SCHEMA")]
SELECT a.attnum, a.attname
FROM pg_attribute a
WHERE a.attrelid = #{oid}
2  activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
View
@@ -403,7 +403,7 @@ def indexes(table_name, name = nil) #:nodoc:
table_name,
row['name'],
row['unique'] != 0,
- exec_query("PRAGMA index_info('#{row['name']}')", "Columns for index #{row['name']} on #{table_name}").map { |col|
+ exec_query("PRAGMA index_info('#{row['name']}')", "SCHEMA").map { |col|
col['name']
})
end
Please sign in to comment.
Something went wrong with that request. Please try again.