add Question
This commit is contained in:
23
db/migrate/20220721124944_create_questions.rb
Normal file
23
db/migrate/20220721124944_create_questions.rb
Normal 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
|
||||
Reference in New Issue
Block a user