Reset stuck exports

parent 172f80bc
class ResetExportStates < ActiveRecord::Migration[5.1]
class User < ApplicationRecord
def up
# rubocop:disable Rails/SkipsModelValidations
User.where(exporting: true).update_all(exporting: false, export: nil, exported_at: nil)
User.where(exporting_photos: true)
.update_all(exporting_photos: false, exported_photos_file: nil, exported_photos_at: nil)
# rubocop:enable Rails/SkipsModelValidations
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment