Permalink
Browse files

Merge pull request #27997 from kamipo/should_keep_pk_column_order

Should keep the primary key column order
  • Loading branch information...
eileencodes committed Feb 14, 2017
2 parents a778a0d + 2693c86 commit e9949265d9fb6e20aa4c73f189147812db377edc
@@ -441,6 +441,7 @@ def primary_keys(table_name) # :nodoc:
WHERE constraint_type = 'PRIMARY KEY'
AND kcu.table_name = #{quote(name.identifier)}
AND kcu.table_schema = #{name.schema ? quote(name.schema) : "ANY (current_schemas(false))"}
ORDER BY kcu.ordinal_position
SQL
end

0 comments on commit e994926

Please sign in to comment.