U
U
Ugitig2014-02-22 14:16:39
MySQL
Ugitig, 2014-02-22 14:16:39

What is the version control system for MySQL?

Good day to all.
Are you interested in any VCS for MySQL (like mercurial).
Now I use this option with mercurial - during the commit, a backup of the database is made (using the pre-commit hook) and saved to a folder along with the project. But this option only works halfway. When commits come from another developer, merge stops on the sql file. You have to drain it manually.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-02-22
@Ugitig

you need migrations . For almost all platforms, there are tools for rolling / rolling back migrations.
And keeping a full database dump in vcs is a bad idea.
In the case of migrations, you have different revisions of the database structure and the data in it. Each migration has the ability to both roll changes and roll them back. If there were changes in the database, the developer writes a migration, commits it, with each pool from the repository, you can run migrations using the same hooks, and if we do not have the latest revision, we roll out new ones. If something went wrong, you can roll back.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question