Class: CreateAlternativesTable
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateAlternativesTable
- Defined in:
- lib/generators/simple_abs/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/simple_abs/templates/migration.rb', line 16 def self.down drop_table :alternatives end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/simple_abs/templates/migration.rb', line 2 def self.up create_table :alternatives, :force => true do |t| t.string "which" t.integer "participants", :default => 0 t.integer "conversions", :default => 0 t.text "experiment" t. end add_index :alternatives, :which end |