Every single day I use Sequel Pro to manage MySQL databases for all projects I'm working on. Sequel Pro gets used in both development and production environments. Because the databases mostly have the same name and tables in all environments it's very easy to mix them up. You have to be really careful and check if you're in the right enviroment when performing a destructive action. In this short blogpost I want to share a tip on how to easily detect if you're working in the right enviroment.

Sequel Pro has an option to apply a color to your favorites. If you pick for instance green for the development environments you'll can easily determine if you are working with development or production data. Here's a screenshot of my favorites.

Screen Shot 2016-07-05 at 18.46.59

In case you don't know Valet and Homestead are two local development environments. Let's open up a database on Valet.

dev database

You see that the tab is colored green, hinting to me that destructive actions are ok. If you don't see the tab, choose Show Tab Bar in the View menu. Let's open up the same database on production.

Screen Shot 2016-07-05 at 18.38.37

You'll notice that this looks very similar to the previous screenshot. But because the tab bar isn't green I immediately know that I shouldn't change data here without a good reason to do so. If you want it to be really explicit, you could opt to color all your production favorites red.