Class: CreateE9Polls
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateE9Polls
- Defined in:
- lib/generators/e9_polls/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
10 11 12 |
# File 'lib/generators/e9_polls/templates/migration.rb', line 10 def self.down drop_table :poll_answers end |
.up ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/generators/e9_polls/templates/migration.rb', line 2 def self.up create_table :poll_answers, :force => true do |t| t.references :poll t.integer :votes, :default => 0 t.text :value end end |