From 65e59e31e06851c5e5cdd0d59bd1346dafdc6574 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 15:39:13 +0800 Subject: [PATCH] =?UTF-8?q?Issue=E8=A1=A8fixed=5Fversion=5Fid=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161111071624_update_fixed_version_id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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