OSDN Git Service

fix profiler extend system
[pettanr/pettanr.git] / db / migrate / 20140329222717_fix_extend_system_data.rb
index 4812aa9..7868231 100644 (file)
@@ -5,28 +5,30 @@ class FixExtendSystemData < ActiveRecord::Migration
       if balloon.speech_balloon_template_classname == 'noname'
         balloon.speech_balloon_template_id = sbt.id
         balloon.speech_balloon_template_classname = sbt.classname
-        balloon.save!
+        balloon.boosts 'post'
       end
+      balloon.save!
     end
     Speech.find(:all).each do |speech|
       sbt = speech.speech_balloon.speech_balloon_template
       if speech.speech_balloon_template_classname == 'noname'
         speech.speech_balloon_template_id = sbt.id
         speech.speech_balloon_template_classname = sbt.classname
-        speech.save!
       end
       wf =  speech.writing_format
       if speech.writing_format_classname == 'noname'
         speech.writing_format_classname = wf.classname
-        speech.save!
       end
+      speech.boosts 'post'
+      speech.save!
     end
     License.find(:all).each do |license|
       lg = license.license_group
       if license.license_group_classname == 'noname'
         license.license_group_classname = lg.classname
-        license.save!
       end
+      license.boosts 'post'
+      license.save!
     end
   end