parent
f74e2cd231
commit
aa3063a931
@ -0,0 +1,4 @@
|
||||
class SubjectAppointment < ApplicationRecord
|
||||
belongs_to :subject
|
||||
belongs_to :user
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddCourseMemberToSubjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :subjects, :student_count, :integer, :default => 0
|
||||
add_column :subjects, :participant_count, :integer, :default => 0
|
||||
end
|
||||
end
|
@ -0,0 +1,10 @@
|
||||
class CreateSubjectAppointments < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :subject_appointments do |t|
|
||||
t.references :subject, index: true
|
||||
t.references :user, index: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubjectAppointment, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in new issue