Class: BeerDb::CreateDbExtrasNotes

Inherits:
Object
  • Object
show all
Defined in:
lib/beerdb/note/schema.rb

Overview

tasting notes (w/ ratings)

Instance Method Summary collapse

Instance Method Details

#upObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/beerdb/note/schema.rb', line 14

def up
  ActiveRecord::Schema.define do
    create_table :notes do |t| # join table (user,beer)
      t.references :beer, :null => false
      t.references :user, :null => false
      t.integer :rating,  :null => false  # 1-10 scala (10 is best)

      t.text :comments
      t.string :place # location (place) where tasted/drunken

      ## todo: add flag for bottle, can, draft

      t.timestamps
    end
  end # Schema.define
end