Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Want to learn the cool stuff? Then sign up now!

Use Sequel Pro’s colored favourites

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.

Freek Van der Herten is a partner and developer at Spatie, an Antwerp based company that specializes in creating web apps with Laravel. After hours he writes about modern PHP and Laravel on this blog. When not coding he’s probably rehearsing with his kraut rock band.
  • Bruno Seixas

    Used to this on HeidiSQL, working on Mac now so switched up to SequelPro.
    Good tip =)

  • I already do this with green being local, do what ever. Orange being dev server so caution might be needed. Red being dont fuck with anything! Nice tip with the show tab bar, I always had a new tab with no connection!

  • Tihomir Opacic

    Great tip! …also added yellow for staging servers.