TLDR Tech / Dev
Don't run SQL migrations in tests: How I sped up the test suite by 2x
Large Go test suites often face slowdowns when thousands of SQL migrations are applied serially for every individual test. To address this, a content-addressing system identifies a "golden" database file by hashing the contents of all required migration scripts. If a matching database already exists, the system clones it instantly using a backup API, whereas missing versions are lazily generated and cached for subsequent runs.
Read the full story