切换分支文件
This commit is contained in:
parent
98f9da9b49
commit
d495f58408
|
@ -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
|
4025
db/schema.rb
4025
db/schema.rb
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue