25 lines
1.3 KiB
Markdown
25 lines
1.3 KiB
Markdown
# ADR 002: Choose a good configuration format.
|
|
|
|
A good configuration file format needs to be selected. There are three main choices that were considered:
|
|
|
|
1. JSON - this is the primary data format used for the web and communications, but is not as readable as the other options.
|
|
2. YAML - this is a much more readable format, and is a superset of JSON (able to load JSON as YAML), however there are weird nuances in this format that can cause problems.
|
|
3. TOML - this is a format similar to the old Windows Config format, but with better structuring. It is readable, and clear like YAML, but without the weird corner cases that YAML has which could break things. However support is small as it is relatively new.
|
|
4. SQL DB Table - this would be using the database system to store what would have been put in a configuration file and making it instead be a configuration table.
|
|
|
|
## Decision
|
|
|
|
SQL DB Table
|
|
|
|
## Rationale
|
|
|
|
Because the system already is using an SQL Database, it makes sense to use a SQL table to store these values in a simple way that then can be retrieved and updated using the same basic SQL components other parts of the application use.
|
|
|
|
## Status
|
|
|
|
Accepted
|
|
|
|
## Consequences
|
|
|
|
Setting up the database already was necessary for the application, this would simply require it to be set up sooner.
|