简体   繁体   中英

Tracking database schema changes in Git

How can database changes be tracked in Git?

Currently we are tracking the database as an SQL file in our Git repo and any changes made in the database are manually recorded in the file for tracking. We are using phpMyAdmin.

Is there anyway to record the database changes automatically in the file with hooks in the phpMyAdmin or pre-commit hooks in Git?

phpMyAdmin has a feature called Tracking (or Change tracking) which can log changes made to the table (either structure only or structure and data), but that doesn't directly interface with git.

This (though unrelated to phpMyAdmin) may be what you're looking for: Using Git to track mysql schema - some questions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM