Skip to content

Commit

Permalink
fix(postgres): auto-confirm db recreate on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
keskiju committed Dec 18, 2024
1 parent b37cebb commit 61ff341
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/postgres-db/db-recreate-50
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# shellcheck source=lib/all.bash
. "${taito_plugin_path:?}/lib/all.bash"

confirm_default=$([[ $taito_mode == "ci" ]] && echo 'yes' || echo 'no')

if [[ ${database_type:-} == "pg" ]] || [[ -z "${database_type}" ]]; then
if taito::confirm "Recreate postgres database ${database_name}" no; then
if taito::confirm "Recreate postgres database ${database_name}" ${confirm_default}; then
postgres::drop_database
postgres::create_database
fi
Expand Down

0 comments on commit 61ff341

Please sign in to comment.