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.
8 lines
312 B
8 lines
312 B
5 years ago
|
class MigrateCourseAtta < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
add_column :attachments, :delay_publish, :boolean, default: 0
|
||
|
|
||
|
Attachment.where(container_type: "Course").where(is_publish: 0).where("publish_time > '#{(Time.now).strftime("%Y-%m-%d %H:%M:%S")}'").update_all(delay_publish: 1)
|
||
|
end
|
||
|
end
|