diff --git a/app/models/challenge_question.rb b/app/models/challenge_question.rb new file mode 100644 index 000000000..bda6780ce --- /dev/null +++ b/app/models/challenge_question.rb @@ -0,0 +1,3 @@ +class ChallengeQuestion < ActiveRecord::Base + attr_accessible :challenge_id, :option, :position, :right_key +end diff --git a/db/migrate/20170721060845_create_challenge_questions.rb b/db/migrate/20170721060845_create_challenge_questions.rb new file mode 100644 index 000000000..5965d8cec --- /dev/null +++ b/db/migrate/20170721060845_create_challenge_questions.rb @@ -0,0 +1,12 @@ +class CreateChallengeQuestions < ActiveRecord::Migration + def change + create_table :challenge_questions do |t| + t.text :option_name + t.integer :challenge_id + t.boolean :right_key + t.integer :position, :limit => 1 + + t.timestamps + end + end +end