&gt; Why would you want to switch databases when you deploy? That&#x27;s asking for bugs that only get revealed in production.<p>Only if you deploy directly to production!<p>Any competent organization should have <i>at least</i> a staging environment (and probably some other pre-staging testing environments) where you deploy and run your full application stack, and only promoted verified builds to production after they pass QA on earlier environments.