diff --git a/db/migrate/20161111071624_update_fixed_version_id.rb b/db/migrate/20161111071624_update_fixed_version_id.rb index b2717ab31..1b1363ecb 100644 --- a/db/migrate/20161111071624_update_fixed_version_id.rb +++ b/db/migrate/20161111071624_update_fixed_version_id.rb @@ -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