Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial and mysql

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?

like image 780
Omar Abid Avatar asked Aug 10 '11 11:08

Omar Abid


2 Answers

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:

  • dbdeploy (free)
  • DB Ghost
  • Redgate SQL Compare
  • Redgate MySQL Compare (free for non-commercial)
  • Visual Studio Database Projects (SSDT)

I'm sure there are more.

like image 106
Paolo Avatar answered Nov 14 '22 01:11

Paolo


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

like image 38
Devart Avatar answered Nov 14 '22 01:11

Devart