contactorama/db/migrate/20110515190518_create_emails.rb

23 lines
457 B
Ruby

class CreateEmails < ActiveRecord::Migration
def self.up
create_table :emails do |t|
t.string :desc
t.string :address
t.timestamps
end
# we drop the 'mails' table as this is basically a renaming (without a need to migrate anything, yet)
drop_table :mails
end
def self.down
create_table :mails do |t|
t.string :desc
t.string :address
t.timestamps
end
drop_table :emails
end
end