Is there any convenient way to include mysqldump in my git transactions?

Especially if I use GitHub? If not, should I (or maybe someone else) work on such a tool?

+3
source share
3 answers

add a script that unloads the sql file somewhere specific for your project (but inside the project directory).

mysqldump -uroot -p my_db > my_project/my_db.sql

this is juts text, so git will select this file just like any other. therefore just

git add my_db.sql
git commit -m "the schema changed"
git push my_project github master

you can consider the following:

0

, , . VCS , .

: , RoR, , .

, , VCS , , .

+2

Output mysqldump is a plain text file.

Each time you change your database, call mysqldump in the same file. Then copy it to your repository when transferring the code.

0
source

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


All Articles