Class: SunriseCreateFeedbackAnswers
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- SunriseCreateFeedbackAnswers
- Defined in:
- lib/generators/sunrise/feedbacks/templates/create_feedback_answers.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
17 18 19 |
# File 'lib/generators/sunrise/feedbacks/templates/create_feedback_answers.rb', line 17 def self.down drop_table :feedback_answers end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/sunrise/feedbacks/templates/create_feedback_answers.rb', line 2 def self.up create_table :feedback_answers do |t| t.text :content, :null => false t.integer :message_id, :null => false t.integer :author_id t.string :author_type, :limit => 30 t. end add_index :feedback_answers, [:author_type, :author_id] add_index :feedback_answers, :message_id end |