Newer
Older
dmpopidor / db / migrate / 20130717130107_add_answer_options_relation.rb
@Marta Ribeiro Marta Ribeiro on 3 Jun 2016 322 bytes DMPonline4 - RAILS 4.0 (#4)
class AddAnswerOptionsRelation < ActiveRecord::Migration
  def up
  	create_table :answers_options, :id => false do |t|
	  t.references :answer, :null => false
	  t.references :option, :null => false
	end

    add_index :answers_options, [:answer_id, :option_id]
  end

  def down
  	drop_table :answers_options
  end
end