mirror of
https://github.com/ershisan99/db-studio.git
synced 2025-12-16 20:59:23 +00:00
19 lines
445 B
Bash
19 lines
445 B
Bash
#!/bin/bash
|
|
|
|
# Clean up PostgreSQL test data
|
|
docker exec -i db-postgres-test psql -U postgres <<EOF
|
|
DROP TABLE IF EXISTS users;
|
|
DROP TABLE IF EXISTS orders;
|
|
EOF
|
|
|
|
# Clean up MySQL test data
|
|
docker exec -i db-mysql-test mysql -uroot -pmysecretpassword --database=test_db<<EOF
|
|
DROP TABLE IF EXISTS users;
|
|
DROP TABLE IF EXISTS orders;
|
|
EOF
|
|
|
|
# Stop and remove Docker containers and volumes
|
|
docker-compose down -v
|
|
|
|
echo "Test databases are cleaned up"
|