in reply to Re: Parse PHP or Perl and Reconstruct MySQL Schema
in thread Parse PHP or Perl and Reconstruct MySQL Schema
I'm with you on keeping code to re-generate the databases.
I keep a few files (create_tables.sql, create_indexes.sql, create_procedures.sql, create_triggers.sql, etc.) for each schema (oracle), and keep a directory near the control files, so it gets backed up regularly.
Whenever I make an adjustment to the database, it gets reflected in the files -- and I append, not modify the existing. (if I drop or add a new column, it's an alter table, so I don't risk creating typos or other mistakes in the earlier stuff that I'll have to manually debug in a disaster recovery situation ... well, with a minor exception for a complete drop table, I'll comment out previous sections.)
|
|---|