Alternative settings implementation

Background

Currently, we rely on using a wide table application_settings for storing all of our settings.

Proposal

I'd like to propose an alternative key-value setting implementation.

We have a few options:

  1. Only string with a serializer
column type
id integer
serializer character varying
key character varying
value character varying
  1. Every type has a separate column
column type
id integer
type character varying
key character varying
value_int integer
value_bool boolean
... ...
  1. Similar to OrganizationSettings (context: #394801 (comment 1424798535))
column type
id integer
settings jsonb

We should be able to interact with these settings by using Setting['some.setting.key'] = true without the need to create database migrations.

UI

In the end, I think we should aim for implementing something similar to about:config (Firefox) to list all existing settings, so that users could change it even if it isn't exposed in UI.

SCR-20230712-nqqm

Edited by Dmitry Gruzd