Class: SportDb::Market::CreateDb
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- SportDb::Market::CreateDb
- Defined in:
- lib/sportdb/market/schema.rb
Instance Method Summary collapse
-
#down ⇒ Object
method up.
- #up ⇒ Object
Instance Method Details
#down ⇒ Object
method up
46 47 48 |
# File 'lib/sportdb/market/schema.rb', line 46 def down raise ActiveRecord::IrreversibleMigration end |
#up ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sportdb/market/schema.rb', line 8 def up create_table :services do |t| # quote service (e.g. tipp3,tipico,etc.) t.string :title, :null => false t.string :key, :null => false t. end create_table :quotes do |t| t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.) t.references :game, :null => false t.decimal :odds1, :null => false t.decimal :oddsx, :null => false t.decimal :odds2, :null => false t.string :comments t. end create_table :event_quotes do |t| t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.) t.references :event, :null => false t.references :team, :null => false t.decimal :odds, :null => false # winner odds (e.g. 3,5 or 90 etc.) t.string :comments t. end create_table :group_quotes do |t| t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.) t.references :group, :null => false t.references :team, :null => false t.decimal :odds, :null => false # winner odds (e.g. 3,5 or 90 etc.) t.string :comments t. end end |