diff options
Diffstat (limited to 'db/post_migrate/20191205084057_update_minimum_password_length.rb')
-rw-r--r-- | db/post_migrate/20191205084057_update_minimum_password_length.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/db/post_migrate/20191205084057_update_minimum_password_length.rb b/db/post_migrate/20191205084057_update_minimum_password_length.rb deleted file mode 100644 index d9324347075..00000000000 --- a/db/post_migrate/20191205084057_update_minimum_password_length.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class UpdateMinimumPasswordLength < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def up - value_to_be_updated_to = [ - Devise.password_length.min, - ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH - ].max - - execute "UPDATE application_settings SET minimum_password_length = #{value_to_be_updated_to}" - - ApplicationSetting.expire - end - - def down - value_to_be_updated_to = ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH - - execute "UPDATE application_settings SET minimum_password_length = #{value_to_be_updated_to}" - - ApplicationSetting.expire - end -end |