Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

DBrancher (DDEV Add-on)

A DDEV add-on that brings isolated, dynamic database routing to your Drupal feature branches. Useful for tricky setups that can’t easily use worktrees.

Features

Smart Garbage Collection

To ensure orphaned databases are deleted when their corresponding pull requests are merged, you must configure Git to automatically prune deleted remote branches:

git config --global fetch.prune true

Once configured, the add-on will automatically sweep MariaDB and delete orphaned databases.

Installation

Run this command from the root of your DDEV project:

ddev add-on get cballenar/ddev-dbrancher-addon

Manual Commands

Customization

By default, the addon protects develop,main,master,HEAD from being dropped and uses the current directory for database dumps.

You can customize the search directory and the protected branches by modifying the .ddev/.dbranch-config file created during installation:

# .ddev/.dbranch-config
DUMP_DIR="tmp"
PROTECTED_BRANCHES="develop,main,master,HEAD,production,staging"

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.