Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Set human-readable indexes for build databases #647

@gregharvey

Description

@gregharvey

Original ticket by @pm98zz-c reads as follows:

We currently rely on index for how we backup/gather info on databases. IE, the resulting structure (as used by settings.php and similar config files) looks like:

{{ build_databases[0].name }}
{{ build_databases[0].user }}
{{ build_databases[0].host }}
...

To make it more reliable, and cope with more use cases, we should instead rely on the database "engine" and the database "base name" as keys. So, resulting structure would look like (using cewww project as an example):

{{ build_databases.mysql.cewww_dev.name }}
{{ build_databases.mysql.cewww_dev.user }}
{{ build_databases.mysql.cewww_dev.host }}
{{ build_databases.redis.cewww_dev.host }}
{{ build_databases.postgresql.cewww_dev.host }}
{{ build_databases.memcache.cewww_dev.host }}
...

Or, in an equivalent but more portable way (pseudo syntax, needs to be checked):

{{ build_databases.mysql[project_name + '' + build_type].name }}
{{ build_databases.mysql[project_name + '' + build_type].user }}
{{ build_databases.mysql[project_name + '_' + build_type].host }}
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions