Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it somehow possible to keep track of changes made to the STRUCTURE (not the data) made to tables?

I mean, i don't want to know when rows are inserted/updated/deleted, what i want is to know when the table definition is been changed (and what those changes were). E.g. to know if/when a column was added, removed, if a column type was changed, if an index was added, etc.

In other words, to keep track of all the "ALTERS" of the tables. (and the state before those alters)

I'd like this to know exactly when some changes were made, and to keep track of discrepancies of data, for example to know when a column was changed to hold VARCHARs instead of INTs (just an idea), or when a new column was added, etc.

So is there a way to do this?

I am using MySQL, version 5.1.66. And, if it is not possible in MySQL, is it in other Databases?


share|improve this question
In SQL-Server, you can do this using DDL triggers – ypercubeᵀᴹ Jul 11 '13 at 20:18
In a disciplined development environment, you'd use your version control system--subversion, mercurial, git, even RCS in a pinch. – Mike Sherrill 'Cat Recall' Jul 11 '13 at 22:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.