diff --git a/docs/developer/decision-records/2023-08-01-default-datasource/README.md b/docs/developer/decision-records/2023-08-01-default-datasource/README.md new file mode 100644 index 00000000000..cdda7e54572 --- /dev/null +++ b/docs/developer/decision-records/2023-08-01-default-datasource/README.md @@ -0,0 +1,27 @@ +# Default Datasource configuration + +## Decision + +All SQL store extensions, if the specific datasource name is not configured should fall back to the default one. + +## Rationale + +Each SQL store implementation as of today needs to have at least one mandatory configuration +parameter `edc.datasource..name` and then in case additional parameters as `url`, `user`, `password` and so on. + +This is powerful for fine-grained configuration and deployment. For simpler case and scenario all the store should +default to a common datasource name, that will be easier to configure. + +## Approach + +All the SQL store extension will default to a common datasource name defined +in `DataSourceRegistry#DEFAULT_DATASOURCE` (**default**) +and then users can configure a single datasource like this: + +``` +edc.datasource.default.user= +edc.datasource.default.password= +edc.datasource.default.url= +... +``` + diff --git a/docs/developer/decision-records/README.md b/docs/developer/decision-records/README.md index 258159a3c68..b7bedf2789f 100644 --- a/docs/developer/decision-records/README.md +++ b/docs/developer/decision-records/README.md @@ -45,3 +45,4 @@ - [2023-06-30-allow-use-of-testcontainers](2023-06-30-allow-use-of-testcontainers/) - [2023-06-30 Sync Commands](2023-07-19-sync-commands) - [2023-06-30 State Machine guards](2023-07-20-state-machine-guards) +- [2023-08-01 Default datasource](2023-08-01-default-datasource)