Issue指派给为0的时候迁移

This commit is contained in:
huang 2016-11-11 14:50:49 +08:00
parent 50a14ad5fe
commit 629770a703
1 changed files with 8 additions and 0 deletions

View File

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