1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Should keep the primary key column order

Fixes CI failure caused by #27961.

https://travis-ci.org/rails/rails/jobs/201472146#L2390-L2409
This commit is contained in:
Ryuta Kamizono 2017-02-14 20:48:08 +09:00
parent a778a0d91f
commit 2693c86090

View file

@ -441,6 +441,7 @@ module ActiveRecord
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