Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lando db-export use mariadb-dump, if it exists #148

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

* Updated `sql-export.sh` to use `mariadb-dump` command (if available). [#148](https://github.com/lando/core/pull/148)

## v3.21.0-beta.18 - [April 29, 2024](https://github.com/lando/core/releases/tag/v3.21.0-beta.18)

* Fixed bug that prevented password prompts from rendering
Expand Down
4 changes: 3 additions & 1 deletion scripts/sql-export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ while (( "$#" )); do
esac
done

# Get type-specific dump cpmmand
# Get type-specific dump command
if [[ ${POSTGRES_DB} != '' ]]; then
DUMPER="pg_dump postgresql://$USER@localhost:$PORT/$DATABASE"
elif [[ ${MARIADB_DATABASE} != '' && -x $(command -v mariadb-dump) ]]; then
DUMPER="mariadb-dump --opt --user=${USER} --host=${HOST} --port=${PORT} ${LANDO_EXTRA_DB_EXPORT_ARGS} ${DATABASE}"
else
DUMPER="mysqldump --opt --user=${USER} --host=${HOST} --port=${PORT} ${LANDO_EXTRA_DB_EXPORT_ARGS} ${DATABASE}"
fi
Expand Down
Loading