help and rules added
[ibet.git] / db / migrate / 20100407130445_create_reactions.rb
blob5eeff0e9b3b83cf61e21306374b3034c335c8795
1 class CreateReactions < ActiveRecord::Migration
2   def self.up
3     create_table :reactions do |t|
4       t.references :user
5       t.references :bet
6       t.text    :answer
7       t.integer :stake
8       t.boolean :agree
9       t.integer :reaction_type
11       t.timestamps
12     end
13     execute %{ALTER TABLE reactions CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin}
14   end
16   def self.down
17     drop_table :reactions
18   end
19 end