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:
- Only string with a serializer
| column | type |
|---|---|
id |
integer |
serializer |
character varying |
key |
character varying |
value |
character varying |
- Every type has a separate column
| column | type |
|---|---|
id |
integer |
type |
character varying |
key |
character varying |
value_int |
integer |
value_bool |
boolean |
... |
... |
- 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.
Edited by Dmitry Gruzd
