切换分支文件

This commit is contained in:
Tim 2016-01-13 17:13:39 +08:00
parent 98f9da9b49
commit d495f58408
2 changed files with 2013 additions and 2029 deletions

View File

@ -1,17 +0,0 @@
class AddLastTermToCourse < ActiveRecord::Migration
def change
add_column :courses, :end_time, :integer
add_column :courses, :end_term, :string
count = Course.all.count / 30 + 2
transaction do
for i in 1 ... count do
Course.page(i).per(30).each do |course|
course.end_time = course.time
course.end_term = course.term
course.save
end
end
end
end
end

File diff suppressed because it is too large Load Diff