Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer update deletes database data dir. #24

Closed
yuki777 opened this issue May 7, 2023 · 0 comments · Fixed by pj8/dbdb#56
Closed

Composer update deletes database data dir. #24

yuki777 opened this issue May 7, 2023 · 0 comments · Fixed by pj8/dbdb#56

Comments

@yuki777
Copy link
Owner

yuki777 commented May 7, 2023

  • Proposal 1

  • Proposal 2

    • Use composer.json > scripts > pre-update-cmd and post-update-cmd
    • Stop all databases and move to /tmp on pre-update-cmd
    • Restore from /tmp to vendor/yuki777/dbdb/(mysql|redis|postgresql|mongodb)/versions on post-update-cmd
"scripts": {
    "pre-update-cmd": "cp -r vendor/yuki777/dbdb/mysql/versions/ /tmp/dbdb_backup",
    "post-update-cmd": "cp -r /tmp/dbdb_backup vendor/yuki777/dbdb/mysql/versions/"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant