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