Commit 155226e3 authored by Kati Paizee's avatar Kati Paizee

Merge branch 'docs-enablement-copy-edit-database-yaml' into 'master'

Docs: Review config/database.yml

See merge request gitlab-org/gitlab!75430
parents 5f03cce6 ccc8df38
......@@ -630,9 +630,13 @@ keys"](loose_foreign_keys.md).
## `config/database.yml`
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
production:
......@@ -642,15 +646,16 @@ production:
...
```
With the support for many databases the support for this
syntax is deprecated and will be removed in [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338182).
With the support for many databases this
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
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
change. If an invalidate or deprecated syntax is used the error
or warning will be printed during application start.
change. If an invalid or deprecated syntax is used the error
or warning is printed during application start.
```yaml
# Non-decomposed database
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment