There is a frustrating issue where my rails migrations update the schema with whitespaces and the position of the table's columns.
So most times when I run bundle exec rake db:migrate
it will do one of the below scenarios. When I merge this into our main branch and other developers work off this, then their rails migration reverts tabs and position ordering.
We have noticed that all three developers on the team have the same issue when running a migration if I have been the last committer of the schema.
I just updated postgres to v9.2.4
that is the same as the other devs. Any ideas of what else I could try?
Examples
Below are git diffs to demonstrate what is happening.
Example of re-ordering the schema:
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
Example of adding tabs to the schema:
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