This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/db/migrate/014_create_experiences.rb

17 lines
388 B
Ruby
Raw Normal View History

class CreateExperiences < ActiveRecord::Migration
def self.up
create_table :experiences do |t|
t.column :people_id, :integer
t.column :beer_id, :integer
t.column :rating, :integer
t.column :created_at, :timestamp
end
add_index :experiences, :people_id
add_index :experiences, :beer_id
end
def self.down
drop_table :experiences
end
end