add Question

This commit is contained in:
João Geonizeli
2022-07-21 09:59:20 -03:00
parent ff815e15f6
commit 9c5b53679d
7 changed files with 211 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
class CreateQuestions < ActiveRecord::Migration[7.0]
def change
create_table :questions do |t|
t.references :user, null: false, foreign_key: true
t.references :subject, null: true, foreign_key: true
t.jsonb :alternatives, null: false, default: []
t.string :authorship
t.string :authorship_year
t.string :bloom_taxonomy
t.text :body
t.string :check_type
t.string :difficulty
t.text :explanation
t.text :instruction
t.text :intention
t.text :references
t.string :status, null: false, default: 'draft'
t.text :support
t.timestamps
end
end
end