parent
d2385d0802
commit
f5609c987b
@ -1,6 +1,10 @@
|
||||
class ExaminationItem < ApplicationRecord
|
||||
enum item_type: { SINGLE: 0, MULTIPLE: 1, JUDGMENT: 2, COMPLETION: 3, SUBJECTIVE: 4, PRACTICAL: 5, PROGRAM: 6 }
|
||||
|
||||
belongs_to :examination_bank, touch: true
|
||||
belongs_to :item_bank, optional: true
|
||||
|
||||
has_many :examination_item_choices, dependent: :destroy
|
||||
belongs_to :container, polymorphic: true, optional: true
|
||||
|
||||
end
|
||||
|
@ -0,0 +1,7 @@
|
||||
class AddForkIdToHacks < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :hacks, :fork_id, :integer, default: 0
|
||||
add_column :examination_items, :container_id, :integer
|
||||
add_column :examination_items, :container_type, :string
|
||||
end
|
||||
end
|
Loading…
Reference in new issue