From db62c1d6c371c41a7206ce90a939be5a212b597a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 22 Jun 2019 14:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=9E=E8=AE=AD=E7=9A=84?= =?UTF-8?q?=E9=95=BF=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190622055449_modify_shixun_info_for_shixuns.rb | 3 --- .../20190622060005_remove_shixun_long_text_for_shixuns.rb | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb diff --git a/db/migrate/20190622055449_modify_shixun_info_for_shixuns.rb b/db/migrate/20190622055449_modify_shixun_info_for_shixuns.rb index 5b3ceada6..1a3aa147b 100644 --- a/db/migrate/20190622055449_modify_shixun_info_for_shixuns.rb +++ b/db/migrate/20190622055449_modify_shixun_info_for_shixuns.rb @@ -11,8 +11,5 @@ class ModifyShixunInfoForShixuns < ActiveRecord::Migration[5.2] evaluate_script: shixun[:evaluate_script], shixun_id: shixun.id) end end - if Shixun.first.description.present? - remove_columns :shixuns, :description, :propaedeutics, :evaluate_script - end end end diff --git a/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb b/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb new file mode 100644 index 000000000..bcc8a2bce --- /dev/null +++ b/db/migrate/20190622060005_remove_shixun_long_text_for_shixuns.rb @@ -0,0 +1,7 @@ +class RemoveShixunLongTextForShixuns < ActiveRecord::Migration[5.2] + def change + if Shixun.first.description.present? + remove_columns :shixuns, :description, :propaedeutics, :evaluate_script + end + end +end