bash

With 12factor style environment configs, it’s a very easy to accidentally connect to your production database when you think you’re connecting to dev. Here’s a simple guard you can add to make sure your  DATABASE_URL isn’t somehow pointed to someplace it’s not supposed to (assuming you’re using Amazon AWS): bash: if [[ ${DATABASE_URL} == *”amazonaws”*…

Read More Patterns: don’t mess up the prod db!