5

I'm using Mercurial for revision control of few projects. I have Mercurial installed both on my VPS and on my local machine. I push changes from my local machine to the remote server. Everything is okay.

However, I make sometimes changes to the database (mySql) and I need to update the database back and forth so that I keep the remote and local versions in sync (using phpmyAdmin).

Isn't there a solution to push changes to mysql like push changes to my remote repository?

Omar Abid
  • 15,753
  • 28
  • 77
  • 108

2 Answers2

6

Database deployment is a pain. The usual solution is to use a tool to look at your source control descrption of the database (as a set of SQL scripts) and the target database and generate/apply a script to make the two match.

Some tools that do this are:

I'm sure there are more.

David Atkinson
  • 5,759
  • 2
  • 28
  • 35
Paolo
  • 22,188
  • 6
  • 42
  • 49
  • 1
    Great answer, there are a couple of tools I was not aware of. Surprisingly, this must one of the few contexts where poorly written custom scripts tend to be better than available third-party tools. – Álvaro González Aug 10 '11 at 12:12
1

Try Database Project (and Schema/Data Comparer) tools in dbForge Studio for MySQL.

Devart
  • 119,203
  • 23
  • 166
  • 186