class StoryBrowser < ActiveRecord::Migration def self.up create_table :stories do |t| t.string :title, :null => false t.text :narrative t.string :path, :null => false end create_table :scenarios do |t| t.belongs_to :story, :null => false t.integer :position, :null => false t.string :title t.timestamps end create_table :steps do |t| t.belongs_to :scenario, :null => false t.integer :position, :null => false t.string :kind t.string :name t.timestamps end end def self.down drop_table :stories drop_table :scenarios drop_table :steps end end