0

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?

user229044
  • 232,980
  • 40
  • 330
  • 338
Nandakumar
  • 1,071
  • 2
  • 11
  • 30

1 Answers1

1

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

Community
  • 1
  • 1
Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43