1class CreateEmails < ActiveRecord::Migration 2 def self.up 3 create_table :emails do |t| 4 t.column :address, :string, :default => 'test@test.com' 5 t.column :subject, :string, :default => 'test subject' 6 t.column :body, :text 7 t.column :updated_at, :datetime 8 t.column :mailbox_id, :integer 9 end 10 end 11 12 def self.down 13 drop_table :emails 14 end 15end