上线迁移问题

This commit is contained in:
huang 2016-11-11 15:35:18 +08:00
parent 1fdf6e2053
commit 766e4fcb1d
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
class UpdateAssginToId < ActiveRecord::Migration class UpdateAssginToId < ActiveRecord::Migration
def up def up
Issue.find_by_sql("update `issues` set assigned_to_id = null where assigned_to_id = 0;") Issue.where(:assigned_to_id => 0).update_all(:assigned_to_id => nil)
end end
def down def down