From cad9f14ce3adb4fdb5c58ee9f3c38562bea10aec Mon Sep 17 00:00:00 2001 From: agatha Date: Sun, 15 Mar 2026 15:46:18 -0400 Subject: [PATCH] chore: add database reset script --- scripts/reset_test_db.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/reset_test_db.sh diff --git a/scripts/reset_test_db.sh b/scripts/reset_test_db.sh new file mode 100755 index 0000000..6002f30 --- /dev/null +++ b/scripts/reset_test_db.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "Resetting test database..." +docker compose exec postgres psql -U proxypool -c " + DROP SCHEMA public CASCADE; + CREATE SCHEMA public; + GRANT ALL ON SCHEMA public TO proxypool; +" + +echo "Running migrations..." +uv run alembic upgrade head + +echo "Done. Database is clean."