Remove thing_type
and thing_id
columns from settings table (#31971)
This commit is contained in:
parent
b82c791770
commit
17c02c9210
6 changed files with 60 additions and 11 deletions
|
@ -13,6 +13,13 @@ class MigrateHideNetworkPreference < ActiveRecord::Migration[6.1]
|
|||
belongs_to :account
|
||||
end
|
||||
|
||||
class Setting < ApplicationRecord
|
||||
# Mirror the behavior of the `Setting` model at this point in db history
|
||||
def value
|
||||
YAML.safe_load(self[:value], permitted_classes: [ActiveSupport::HashWithIndifferentAccess, Symbol]) if self[:value].present?
|
||||
end
|
||||
end
|
||||
|
||||
def up
|
||||
Account.reset_column_information
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue