Skip to content

Commit

Permalink
Add dump command
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Fritsch committed Jul 11, 2024
1 parent 685dfe4 commit cda967c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .ddev/commands/web/dump-test-database
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#ddev-generated

## Description: Dump the database as PHP file into the docroot.
## Usage: dump-test-database
## Example: ddev dump-test-database

cd "${DDEV_COMPOSER_ROOT}"/"${DDEV_DOCROOT}" || exit

# shellcheck disable=SC2154
php core/scripts/db-tools.php dump-database-d8-mysql > "${thunderDumpFile}"
2 changes: 2 additions & 0 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ database:
version: "10.11"
use_dns_when_possible: true
composer_version: "2"
web_environment:
- thunderDumpFile=${DDEV_COMPOSER_ROOT}/${DDEV_DOCROOT}/test-database-dump.php
nodejs_version: "18"

# Key features of DDEV's config.yaml:
Expand Down

0 comments on commit cda967c

Please sign in to comment.