上线迁移问题
This commit is contained in:
parent
1fdf6e2053
commit
766e4fcb1d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue