Sha256: 28abc4a412a0f99e606d769e64b610ed9513c13f3c61ce08090179f683b03af9
Contents?: true
Size: 385 Bytes
Versions: 13
Compression:
Stored size: 385 Bytes
Contents
class CreateAnswers < ActiveRecord::Migration def change create_table :answers do |t| t.belongs_to :answerer, :polymorphic => true t.belongs_to :question t.belongs_to :choice t.text :answer t.timestamps end add_index :answers, [:answerer_id, :answerer_type] add_index :answers, :question_id add_index :answers, :choice_id end end
Version data entries
13 entries across 13 versions & 1 rubygems