This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2007-11-11 01:33:08 -05:00
|
|
|
class CreateBeers < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :beers do |t|
|
|
|
|
t.column :title, :string
|
|
|
|
t.column :abv, :float
|
|
|
|
t.column :original_gravity, :float
|
|
|
|
t.column :final_gravity, :float
|
2008-01-07 00:46:43 -05:00
|
|
|
t.column :style_id, :integer
|
2008-02-03 00:50:41 -05:00
|
|
|
t.column :created_at, :timestamp
|
2007-11-11 01:33:08 -05:00
|
|
|
end
|
2008-02-03 00:50:41 -05:00
|
|
|
add_index :beers, :title
|
2008-01-07 00:46:43 -05:00
|
|
|
add_index :beers, :style_id
|
2007-11-11 01:33:08 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :beers
|
|
|
|
end
|
|
|
|
end
|