Dear Monks,

I'm looking for a CPAN module or anything inside the DBI scope that I can employ to synchronize database layouts. Something that can basically make diffs between two databases, and generate CREATE and ALTER statements for MySQL.

I've got a CGI::Application that I'm using to share a common codebase for many instances of a site. Each 'instance' of the CGI::Application has it's own copy of the database to work with...

...using CGI::Application allows me to make all my changes and bug-fixes in one place, which is great. But what happens when I want to change the length of a column in the DB? What about adding a column? It seems to me I'm going to have to go around and make this same change to every instance of the database, which seems rather tedious and unnecessary.

If the CGI::Application could compare it's DB layout to the Main DB and make small updates, changes, etc, things would be much smoother.


Does anything do this?
Is anybody else doing this? Any suggestions?

--twerq.

In reply to DBI -- Synchronize table diffs? by twerq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.