chore: add database reset script
This commit is contained in:
parent
0614770e17
commit
cad9f14ce3
14
scripts/reset_test_db.sh
Executable file
14
scripts/reset_test_db.sh
Executable file
@ -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."
|
||||
Loading…
x
Reference in New Issue
Block a user