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

Add warden db dump command #310

Merged
merged 3 commits into from
Feb 23, 2021
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 commands/db.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ case "${WARDEN_PARAMS[0]}" in
| "${WARDEN_DIR}/bin/warden" env exec -T db \
mysql -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" --database="${MYSQL_DATABASE}" "${WARDEN_PARAMS[@]:1}" "$@"
;;
dump)
"${WARDEN_DIR}/bin/warden" env exec -T db \
mysqldump -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" "${WARDEN_PARAMS[@]:1}" "$@"
;;
*)
fatal "The command \"${WARDEN_PARAMS[0]}\" does not exist. Please use --help for usage."
;;
Expand Down
5 changes: 3 additions & 2 deletions commands/db.help
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ WARDEN_USAGE=$(cat <<EOF
-h, --help Display this help menu

\033[33mCommands:\033[0m
connect Launches an interactive mysql session within the current project environment
import Reads data from stdin and loads it into the current project\047s mysql database
connect Launches an interactive mysql session within the current project environment
import Reads data from stdin and loads it into the current project\047s mysql database
dump Dumps database from db container via mysqldump
EOF
)