mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
15 lines
395 B
Ruby
15 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
|