You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
569 B
20 lines
569 B
class CreateCourseMembers < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :course_members do |t|
|
|
t.integer :course_id
|
|
t.integer :user_id
|
|
t.integer :course_group_id, default: 0
|
|
t.integer :graduation_group_id, default: 0
|
|
t.integer :role, default: 0
|
|
t.boolean :is_active, default: 1
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :course_members, :course_id
|
|
add_index :course_members, :user_id
|
|
add_index :course_members, :course_group_id
|
|
add_index :course_members, :graduation_group_id
|
|
end
|
|
end
|