How to synchronize the version of the MySQL database and code a web application during development?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/code-flow.club/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
7 views
Original data:
1) web app in php (well, it does not matter what language), lying in git (or other CVS)
2) MySQL database
3) All SQL code stored in the database as stored procedures.

How to synchronize application code and database schema and stored procedures?
Procedures matter of course is easier — you can each procedure put in a separate file that is tracked in git (or other CVS)
But what about the table structure? Generates handles for each change of ALTER TABLE and put them in separate files — time consuming.
Maybe there are some utilities that do it automatically, a La Oracle Database Version Control?
I want to have the option when upgrading the application to execute one sql script that updates the database. Unless of course it's possible.
by | 7 views

5 Answers

0 like 0 dislike
by
0 like 0 dislike
If you are on PHP — try Doctrine ORM supports this very easy migration. You can also tie some deployment-type Tulsa Capistrano, but the meaning still comes down to consistent application of the ALTER-constructions, though not quite handles.
by
0 like 0 dislike
by
0 like 0 dislike
For DB, it is possible to consider the instruments on www.sqlaccessories.com/ — about the price I can't say how expensive or cheap. For MS SQL personally used in the project, declared support for other databases, including MySQL. Program-generated scripts in SVN as plain text files to store. Actually you can store binary files, only the preview changes will not be available probably.
by
0 like 0 dislike
You can try to do it with dbForge Schema and Data Compare for MySQL, these products are ideal for comparing and synchronizing schemas and database tables.
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
0 like 0 dislike
7 answers
110,608 questions
257,186 answers
0 comments
24,990 users