| 1 | # Default Datasource configuration |
| 2 | |
| 3 | ## Decision |
| 4 | |
| 5 | All SQL store extensions, if the specific datasource name is not configured should fall back to the default one. |
| 6 | |
| 7 | ## Rationale |
| 8 | |
| 9 | Each SQL store implementation currently must have at least one mandatory configuration |
| 10 | parameter `edc.datasource.<entity>.name` and then in case additional parameters as `url`, `user`, `password` and so on. |
| 11 | |
| 12 | This is powerful for fine-grained configuration and deployment. For simpler cases and scenario all the stores should |
| 13 | default to a common datasource name, that will be easier to configure. |
| 14 | |
| 15 | ## Approach |
| 16 | |
| 17 | All the SQL store extensions will default to a common datasource name defined |
| 18 | in `DataSourceRegistry#DEFAULT_DATASOURCE` (**default**) |
| 19 | and then users can configure a single datasource like this: |
| 20 | |
| 21 | ``` |
| 22 | edc.datasource.default.user= |
| 23 | edc.datasource.default.password= |
| 24 | edc.datasource.default.url= |
| 25 | ... |
| 26 | ``` |
| 27 | |