Skip to content

Removing support for `uses_legacy_database_config`

GitLab will no longer support uses_legacy_database_config in %15.0 .

Please see below instructions for how to correctly update your config and any steps you need to take during the migration.

More information

GitLab is adding support to run multiple databases, for example to separate tables for the continuous integration features from the main database. In order to prepare for this change, we validate the structure of the configuration in database.yml to ensure that only known databases are used.

Previously, the config/database.yml looked like this:

production:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_production
  ...

With the support for many databases this syntax is deprecated and will be removed in 15.0.

The new config/database.yml needs to include a database name to define a database configuration. Only main: and ci: database names are supported. The main: database must always be a first entry in a hash. If an invalid or deprecated syntax is used the error or warning is printed during application start.

production:
  main:
    adapter: postgresql
    encoding: unicode
    database: gitlabhq_production
    ...

Steps to migrate

If you use the latest version of the helm chart (or at least helm chart version v5.3.0), the config/database.yml should be updated automatically.

TBD for other installation methods

Edited by Thong Kuah