Php Db Sync

I have a local server where I do all my testing and work. Once I'm done, I just load the db schema along with the corresponding code. However, the problem arises when I make some changes to the circuit. I need to manually enter the query "alter table" on my real server.

Is there a way to get incremental changes that have occurred in the db schema so that I can just apply the new ones? Or do I need to manually track?

If I use mysqldump, then it creates the final db schema (not with alter table, etc.).

Many thanks.

+3
source share
5 answers

MySQL Workbench ALTER (File β†’ Export β†’ Forward Engineer SQL ALTER Script). . , - CREATE script ( ). DBDesigner 4, XML-, ..

0

delta sql, . script , X Y "". , - .

+2

How about saving the changes you made during the development process, checking these changes as a group for life?

+1
source

Check out Liquibase . This is Java, but it works quite well.

0
source

You can use this tool for the automation process ^ http://hg.antonoff.info/idler/mmp/wiki/Home

PHP only requirement (but version> = 5.3)

0
source

Source: https://habr.com/ru/post/1706659/


All Articles