Reset stuck exports
This commit is contained in:
parent
172f80bcae
commit
1db6381308
1 changed files with 12 additions and 0 deletions
12
db/migrate/20170813222333_reset_export_states.rb
Normal file
12
db/migrate/20170813222333_reset_export_states.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
class ResetExportStates < ActiveRecord::Migration[5.1]
|
||||||
|
class User < ApplicationRecord
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in a new issue