Database snapshots like database dumps are probably at least a little-bit behind the codebase so let's run the same post db import script as we do after db import (in current PR 1 line above the change). Atm this will clear caches, sanitize db and generate uli link - https://github.com/wunderio/ddev-drupal/blob/main/dist/.ddev/wunderio/core/hooks-db-post-import.sh . In future maybe we'll also add drush deploy.
Screenshots
Testing
Install this update to your site:
ddev composer require wunderio/ddev-drupal:dev-feature/6-Run-post-db-updates-after-snapshot-restore --dev
Note that switching to feature branch confuses our auto update command so after restoring snapshot in next step, don't say y
Create snapshot if you don't already have one.
ddev snapshot --name testing-post-restore-snapshot
Restore the snapshot which will trigger the hook:
ddev snapshot restore testing-post-restore-snapshot
Finally delete the snapshot (using wildcard because ending is your db engine which can vary).
rm -rf .ddev/db_snapshots/testing-post-restore-snapshot*
Overview
Database snapshots like database dumps are probably at least a little-bit behind the codebase so let's run the same post db import script as we do after db import (in current PR 1 line above the change). Atm this will clear caches, sanitize db and generate uli link - https://github.com/wunderio/ddev-drupal/blob/main/dist/.ddev/wunderio/core/hooks-db-post-import.sh . In future maybe we'll also add
drush deploy
.Screenshots
Testing
Install this update to your site:
ddev composer require wunderio/ddev-drupal:dev-feature/6-Run-post-db-updates-after-snapshot-restore --dev
Note that switching to feature branch confuses our auto update command so after restoring snapshot in next step, don't say yCreate snapshot if you don't already have one.
ddev snapshot --name testing-post-restore-snapshot
Restore the snapshot which will trigger the hook:
ddev snapshot restore testing-post-restore-snapshot
Finally delete the snapshot (using wildcard because ending is your db engine which can vary).
rm -rf .ddev/db_snapshots/testing-post-restore-snapshot*