有一个令人沮丧的问题,我的 rails 迁移使用空格和表列的位置更新架构。
所以大多数时候当我运行bundle exec rake db:migrate
它时,它会执行以下场景之一。当我将它合并到我们的主分支中并且其他开发人员解决这个问题时,他们的 Rails 迁移会恢复选项卡和位置顺序。
我们注意到,如果我是模式的最后一个提交者,则团队中的所有三个开发人员在运行迁移时都会遇到相同的问题。
我刚刚更新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