OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / db / migrate / 20140329222717_fix_extend_system_data.rb
index 6e87e62..8582368 100644 (file)
@@ -2,30 +2,31 @@ class FixExtendSystemData < ActiveRecord::Migration
   def up
     Balloon.find_each do |balloon|
       sbt = balloon.speech_balloon.speech_balloon_template
-      if balloon.speech_balloon_template_classname == 'noname'
+      if balloon.speech_balloon_template_module_name == 'noname'
         balloon.speech_balloon_template_id = sbt.id
-        balloon.speech_balloon_template_classname = sbt.classname
+        balloon.speech_balloon_template_module_name = sbt.module_name
+        p balloon
         balloon.boosts 'post'
       end
       balloon.save!
     end
     Speech.find_each do |speech|
       sbt = speech.speech_balloon.speech_balloon_template
-      if speech.speech_balloon_template_classname == 'noname'
+      if speech.speech_balloon_template_module_name == 'noname'
         speech.speech_balloon_template_id = sbt.id
-        speech.speech_balloon_template_classname = sbt.classname
+        speech.speech_balloon_template_module_name = sbt.module_name
       end
       wf =  speech.writing_format
-      if speech.writing_format_classname == 'noname'
-        speech.writing_format_classname = wf.classname
+      if speech.writing_format_module_name == 'noname'
+        speech.writing_format_module_name = wf.module_name
       end
       speech.boosts 'post'
       speech.save!
     end
     License.find_each do |license|
       lg = license.license_group
-      if license.license_group_classname == 'noname'
-        license.license_group_classname = lg.classname
+      if license.license_group_module_name == 'noname'
+        license.license_group_module_name = lg.module_name
       end
       license.boosts 'post'
       license.save!