mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
16 lines
395 B
Ruby
16 lines
395 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class ActivateSelfhostedUsers < ActiveRecord::Migration[8.0]
|
||
|
|
def up
|
||
|
|
return unless DawarichSettings.self_hosted?
|
||
|
|
|
||
|
|
User.update_all(status: :active) # rubocop:disable Rails/SkipsModelValidations
|
||
|
|
end
|
||
|
|
|
||
|
|
def down
|
||
|
|
return unless DawarichSettings.self_hosted?
|
||
|
|
|
||
|
|
User.update_all(status: :inactive) # rubocop:disable Rails/SkipsModelValidations
|
||
|
|
end
|
||
|
|
end
|