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.
|
class MigrateSubjectStatus < ActiveRecord::Migration[5.2]
|
|
def change
|
|
Subject.unhidden.visible.update_all(public: 2)
|
|
Subject.where(status: 1, id: ApplyAction.where(container_type: 'ApplySubject', status: 0)
|
|
.pluck(:container_id)).update_all(status: 2, public: 1)
|
|
end
|
|
end
|