parent
2cd805ef4c
commit
9f807438d6
@ -0,0 +1,10 @@
|
|||||||
|
class AddDataForMembers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
StudentsForCourse.all.each do |stu|
|
||||||
|
if Member.where(:user_id => stu.student_id, :course_id => stu.course_id).first.nil?
|
||||||
|
mem = Member.new(:user_id => stu.student_id, :course_id => stu.course_id, :course_group_id => 0, :project_id => -1, :mail_notification => 0, :role_ids => [10])
|
||||||
|
mem.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue