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."