Sebastian Hoitz
Sebastian Hoitz

Reputation: 9383

Experiences with phpMyVersion

I've been looking for an easy and automated way to detect changes on my database structure so I can check them into subversion and be able to roll back to older versions etc.

Now I found phpMyVersion, which seems to do exactly that job. I didn't have time to look into it in great detail, but does anyone of you have some experiences with phpMyVersion?

Thanks, Sebastian

Upvotes: 0

Views: 214

Answers (2)

Paul Lammertsma
Paul Lammertsma

Reputation: 38252

I have solved this precise issue on our server using (My)SQL, Bash script and SVN.

The Bash script does the following:

  1. Perform a SVN update on a specific folder;
  2. Export the database to a SQL file;
  3. Commit the SQL file to SVN.

Simply have the script run using cron. We dump a backup to SVN every night at midnight.

cd /[PATH]/server_backup
svn --username [USERNAME] --password [PASSWORD] update --non-interactive
insert --skip-comments > database.sql
mysqldump [DATABASE] -u[USERNAME] -p[PASSWORD] --skip-extended-insert --skip-comments > database.sql
svn --username [USERNAME] --password [PASSWORD] commit --message "Server backup" --non-interactive

Upvotes: 3

Ólafur Waage
Ólafur Waage

Reputation: 70001

First of all, check here. The version of the program is 0.1.1 and it's not been updated for 701 days. Does not inspire confidence.

Upvotes: 2

Related Questions