DDVEV: Change database server version
# Export database(s)
DB_DATE=`date '+%y%m%d'`;
DB_NAME='db';
ddev export-db --database=$DB_NAME --file=var/tmp/$DB_NAME.$DB_DATE.sql.gz
# Delete ddev project
ddev delete --omit-snapshot
# Set new version in .ddev/config.yaml
# Restart
ddev restart
# Import databse(s)
ddev import-db --database=$DB_NAME --file=var/tmp/$DB_NAME.$DB_DATE.sql.gz
# Show the current binary database type.
ddev debug get-volume-db-version
# Check if your configured project matches the binary database type
ddev debug check-db-match
# Cleanup
rm -f var/tmp/$DB_NAME.$DB_DATE.sql.gz
External resources