Announcing X-Ray For Mergebot: Visualize Your Database Changes

Something new is coming to Mergebot, our solution for making merging database changes easier. One of the hardest things during site development is seeing what has been done to the database so you can replicate it on the live site.

Well, with what’s coming to Mergebot, you could.

Introducing X-Ray for Mergebot – a new way to visualize the changes made to a database. Let’s take a look at the what we do in Mergebot already and how X-Ray will work.

If you aren’t familiar with Mergebot, here’s a quick recap. Mergebot records all the changes made on a development site and allows you to safely apply them to a live site without overwriting data. To do this, Mergebot records queries executed on the development site and sends them to our app so we can do all the ID replacement and other clever stuff before deployment. When you are ready to deploy your changes you can view and control which queries will be deployed with our Query Selection view.

This functionality is pretty powerful, but it’s not the easiest way to visualize the actual changes being made to the database on deployment. Even if you’re fluent in SQL, reading lines and lines of queries is no picnic. So we had a thought. What if we could see the data changes in a more familiar phpMyAdmin or Sequel Pro user interface, explore the changes by table and see all the new rows, those that have been deleted, and highlighting rows that have been updated. Sounds pretty nifty, doesn’t it?

X-Ray for Mergebot

So what will X-Ray look like? We’ve built these mock-ups to give you a sneak peek:

X-Ray for Mergebot mockup - visualize database changes

The panel down the left shows the tables in the development database that have had changes. Clicking on a table will show a tabular view in the main panel where new rows are in blue, deleted rows show in red, and any row that has been updated will highlight the columns in yellow. Hovering over an updated column will show you a diff of that piece of data, and for large pieces of data we will present the diff in a modal:

X-Ray for Mergebot diff modal mockup - visualize database changes

At the top of the screen there’s a timeline scrubber that allows you to only show the changes between a specific time and date range. This enables you to change one setting in the WordPress dashboard and see what changes were made to the database or view all the changes that have happened for the past two weeks.

Making Development Easier

With the ability to quickly drill down on a table to see what has changed, Mergebot will become even more valuable during the development phase of a project. Once you’ve made a bunch of changes you can quickly see them and any other data that has been added, updated or deleted by a plugin or your theme.

For small scale development this insight can be used for scripting changes to production, or even manually recreating the changes on production. But for the majority of developers, being able to control which changes should make it to a deployment through this kind of interface will be extremely beneficial and in the future we hope to add a checkbox to each row of data in X-Ray to enable this.

What Do You Think?

As site developers ourselves, we think X-Ray will be an invaluable part of Mergebot, but we are a bit biased! We’d love to hear what you think.

If you’re already a Mergebot user, is this the missing part of understanding what data has changed and what queries will make up a deployment?

If you aren’t a Mergebot user (yet 😉), does this look like something that might be useful on future projects?

About the Author

Brad Touesnard

As founder of Delicious Brains Inc., Brad wears many hats; from coding and design, to marketing and partnerships. Before starting Delicious Brains, Brad was a busy freelance web developer, specializing in front-end development.

  • Clare Parkinson

    It’s version control for data! This looks really useful.

  • Luke Cavanagh

    Awesome feature.

  • diversityX

    Very nice! I don’t want to write schemas, and do mysql admin. phpMyAdmin is user hostile, and Navicat not much better. I want a nice GUI that is easy to understand and deploy.

  • Blue Fern Solutions

    Wow! Nice 🙂 This is something that would be very useful. Are you considering a solution that could be used separately to Mergebot? Something like version control for databases?