Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: allow encrypt_pms_default to be null
We should allow `encrypt_pms_default` to be null in case plugin is disabled or deleted. In addition, fallback is added to use value from SiteSetting.
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
db/post_migrate/20221123235603_allow_encrypt_pms_default_to_be_null.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class AllowEncryptPmsDefaultToBeNull < ActiveRecord::Migration[7.0] | ||
def up | ||
change_column :user_options, :encrypt_pms_default, :boolean, null: true | ||
end | ||
|
||
def down | ||
change_column :user_options, :encrypt_pms_default, :boolean, null: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters