私のレール移行が空白とテーブルの列の位置でスキーマを更新するというイライラする問題があります。
そのため、ほとんどの場合、実行bundle exec rake db:migrate
すると以下のシナリオのいずれかが実行されます。これをメインブランチにマージし、他の開発者がこれに取り掛かると、レールの移行によりタブと位置の順序が元に戻ります。
チームの 3 人の開発者全員が、スキーマの最後のコミッターであった場合、移行を実行するときに同じ問題を抱えていることに気付きました。
postgres to v9.2.4
他の開発者と同じように更新しました。他に何を試すことができるかについてのアイデアはありますか?
例
以下は、何が起こっているかを示すための git diff です。
スキーマの並べ替えの例:
create_table "accounts", :force => true do |t|
t.integer "organisation_id"
- t.boolean "active", :default => false
t.text "notes"
+ t.boolean "active", :default => false
end
スキーマにタブを追加する例:
create_table "comments", :force => true do |t|
- t.integer "commentable_id", :default => 0
- t.string "commentable_type", :default => ""
+ t.integer "commentable_id", :default => 0
+ t.string "commentable_type", :default => ""
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false