GitLab will support running multiple databases in the future, for example to [separate tables for the continuous integration features](https://gitlab.com/groups/gitlab-org/-/epics/6167) from the main database. In order to prepare for this change, we [validate the structure of the configuration](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67877) in `database.yml` to ensure that only known databases are used.
GitLab is adding support to run multiple databases, for example to
[separate tables for the continuous integration features](https://gitlab.com/groups/gitlab-org/-/epics/6167)
from the main database. In order to prepare for this change, we
[validate the structure of the configuration](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67877)
in `database.yml` to ensure that only known databases are used.
Previously, the `config/database.yml`would look like this:
Previously, the `config/database.yml`looked like this:
```yaml
```yaml
production:
production:
...
@@ -642,15 +646,16 @@ production:
...
@@ -642,15 +646,16 @@ production:
...
...
```
```
With the support for many databases the support for this
With the support for many databases this
syntax is deprecated and will be removed in [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338182).
syntax is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/338182)
and will be removed in [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338182).
The new `config/database.yml` needs to include a database name
The new `config/database.yml` needs to include a database name
to define a database configuration. Only `main:` and `ci:` database
to define a database configuration. Only `main:` and `ci:` database
names are supported today. The `main:` needs to always be a first
names are supported. The `main:` database must always be a first
entry in a hash. This change applies to decomposed and non-decomposed
entry in a hash. This change applies to decomposed and non-decomposed
change. If an invalidate or deprecated syntax is used the error
change. If an invalid or deprecated syntax is used the error
or warning will be printed during application start.