Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test;"
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test;"
psql --dbname=app_test --no-psqlrc -c < db/structure.sql
for n in $(seq 2 $parallel_tests_count); do
(
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test$n;"
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test$n WITH TEMPLATE app_test;"
) &
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.