开发者

Track MySQL schema and procedures change

开发者 https://www.devze.com 2023-03-13 09:29 出处:网络
Recently I changed some table schema and procedures in DEV environment. Before i deploy it to production environment, I want to have a change list.

Recently I changed some table schema and procedures in DEV environment. Before i deploy it to production environment, I want to have a change list.

How to track or show the schema and procedures change history in MySQL? For example, show which tables have been changed after 2011-06-10, which procedures have been creat开发者_StackOverflow中文版ed or updated after 2011-06-08.


This is a longer route, but, you could you create a data dictionary. You can date them, and then represent the different schema version, or even changes to the schema. They are easily tracked with your favorite version control tool.


information_schema tables have create date fields which would get you a list of added tables and procedures etc after a particular date but modifications can't be identified by this method. However, a much simpler method would be to restore a prod backup to a different name and then use the mysqldiff utility to identify the changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号