Rasmus Schultz

Change tracking with phpMyAdmin

February 14th, 2011

A couple of years back, I posted a feature request in the phpMyAdmin tracker. I was planning to implement this feature myself and I wrote a fairly complete specification. I submitted that with my feature request.

Much to my excitement, I recently discovered that this feature is now available in phpMyAdmin, and pretty much to my exact specifications!

The feature is change tracking – essentially a simple automatic schema version control system.

You can think of this idea as auto-generated, forward-only migrations. In other words, it doesn’t enable you to easily revert to a previous schema version, except by re-initializing the schema to a previous version, destroying existing data – but it also doesn’t involve writing migrations by hand.

You just open your schema, turn on tracking, and then proceed to work with phpMyAdmin the way you normally would – making changes to the schema (and/or data) using the GUI interface; your choice of SQL statements are tracked and recorded, and at the end, a snapshot of the complete schema is taken, enabling you to upgrade from one schema version to another, or initialize the schema to a specific version.

If you’re not already using database migrations, this could be a big timesaver, and should lighten the work of keeping your local/test/production databases in sync – as well as maintaining a history of what was changed and when. Nice!

Thanks, phpMyAdmin Team!

Rasmus Schultz has worked for web development companies, advertising agencies and a music software company during his extensive development career. His main strengths are software development and database design. Rasmus has more than a decade of experience with many development platforms, languages and standards.

Leave a Reply

©2013 GORGES - All rights reserved
where programming meets design and lives happily ever after