Slide 143
Slide 143 text
class CreatePeople < ActiveRecord::Migration
def self.up
create_table :people do |t|
t.column :name, :string, :null=>true
t.column :employer_id, :integer, :null=>false
t.column :created_at, :datetime
t.column :updated_at :datetime
end
end
def self.down
drop_table :people
end
end
Tuesday, 22 May 12