From 899c7fb673408e839febe7b9720af7bee9c2a8d9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 22 Jun 2019 14:08:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190622060005_remove_shixun_long_text_for_shixuns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb b/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb index bcc8a2bce..4557c610f 100644 --- a/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb +++ b/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb @@ -1,6 +1,6 @@ class RemoveShixunLongTextForShixuns < ActiveRecord::Migration[5.2] def change - if Shixun.first.description.present? + if Shixun.first.has_attribute?(:description) remove_columns :shixuns, :description, :propaedeutics, :evaluate_script end end