Class: BeerDb::CreateDbExtrasBookmarks
- Inherits:
-
Object
- Object
- BeerDb::CreateDbExtrasBookmarks
- Defined in:
- lib/beerdb/note/schema.rb
Instance Method Summary collapse
Instance Method Details
#up ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/beerdb/note/schema.rb', line 57 def up ActiveRecord::Schema.define do create_table :bookmarks do |t| # join table (user,beer/brewery) t.references :bookmarkable, :polymorphic => true # todo: check add :null => false is possible/needed? t.references :user, :null => false t.boolean :yes, :null => false, :default => false # like/favorite/top t.boolean :no, :null => false, :default => false # dislike/flop/blacklisted t.boolean :wish, :null => false, :default => false # e.g wish == false == drunk / wishlist (beer not yet drunken/tasted) t. end end # Schema.define end |