--- /dev/null
+require Rails.root + 'config/environment'
+class CopyToScroll < ActiveRecord::Migration
+ def up
+ ::Comic.find(:all).each do |i|
+ attr = i.attributes
+ attr.delete 'id'
+ ::Scroll.create! attr
+ end
+ ::Story.find(:all).each do |i|
+ attr = i.attributes
+ attr.delete 'id'
+ attr.delete 'x'
+ attr.delete 'y'
+ attr.delete 'z'
+ attr['scroll_id'] = attr['comic_id']
+ attr.delete 'comic_id'
+ ::ScrollPanel.create! attr
+ end
+ end
+
+ def down
+ end
+end