Fast database tests: migrate a template once, copy it per test
Migrating a fresh schema for every database test was most of the suite’s time. Migrating one template per run and copying it with CREATE DATABASE … TEMPLATE cut the setup to a fifth and the suite by more than half.
Read more: Fast database tests: migrate a template once, copy it per test
