Skip to content

if test db already exists, drop it and recreate

Administrator requested to merge cc/gracefully-recreate-db into main

Created by: camdencheek

Sometimes, with things like schema migrations and such, test databases will already exist. It's probably possible to be smarter about transactional guarantees and such, but it's difficult because dbs can't be created in transactions. Also, this is just for tests, so we don't care if we're dropping old data.

This also adds a bunch of error wrapping so it's easier to see what's going wrong if there are further issues to clean up.

Merge request reports

Loading