Issue表fixed_version_id数据迁移

This commit is contained in:
daiao 2016-11-11 15:39:13 +08:00
parent 8fce011392
commit 65e59e31e0
1 changed files with 1 additions and 1 deletions

View File

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