parent
cfcfc9c580
commit
e621a54f06
@ -0,0 +1,13 @@
|
||||
class MigrateHomeworkCommonEndTime2 < ActiveRecord::Migration
|
||||
def up
|
||||
homework_commons = HomeworkCommon.where("id >= 21549")
|
||||
homework_commons.each do |homework|
|
||||
if homework.publish_time.nil?
|
||||
homework.update_column('end_time', nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in new issue