diff options
| author | Ryuta Kamizono <kamipo@gmail.com> | 2017-02-14 20:48:08 +0900 |
|---|---|---|
| committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-02-14 20:50:36 +0900 |
| commit | 2693c860902aa16029324c16c98739b3dafd23eb (patch) | |
| tree | 8ec6e460e24f8aabc20cb66c69ab5de4e8031485 | |
| parent | a778a0d91fd662d5efa8e548c40b6c79f7e921fc (diff) | |
| download | rails-2693c860902aa16029324c16c98739b3dafd23eb.tar.gz rails-2693c860902aa16029324c16c98739b3dafd23eb.tar.bz2 rails-2693c860902aa16029324c16c98739b3dafd23eb.zip | |
Should keep the primary key column order
Fixes CI failure caused by #27961.
https://travis-ci.org/rails/rails/jobs/201472146#L2390-L2409
| -rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | 1 |
1 files changed, 1 insertions, 0 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 863a0dd997..a61d920a73 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -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 |
