1 class ConnectStory < ActiveRecord::Migration
3 pn = Panel.find_each do |i|
8 st = Story.where(['comic_id = ? and panel_id = ? and t = ?', c, s, t]).first
9 st = Story.new(:comic_id => c, :panel_id => s, :t => t) unless st
13 remove_column :comics, :editable
14 remove_column :panels, :comic_id
15 remove_column :panels, :t
16 add_column :panels, :publish, :integer, :null => false, :default => 0
20 add_column :comics, :editable, :integer, :null => false, :default => 0
21 add_column :panels, :comic_id, :integer, :null => false, :default => 0
22 add_column :panels, :t, :integer, :null => false, :default => 0
23 remove_column :panels, :publish
24 st = Story.find_each do |i|
27 pn = Panel.find(i.panel_id)