The doc:

FINDING THE DIFFERENCES BETWEEN TWO SCHEMAS ^

As mentioned above, the "sqlt-diff" schema examines two schemas and creates SQL schema modification statements that can be used to transform the first schema into the second. The flag syntax is somewhat quirky:

  $ sqlt-diff foo-v1.sql=MySQL foo-v2.sql=Oracle > diff.sql

As demonstrated, the schemas need not even be from the same vendor, though this is likely to produce some spurious results as datatypes are not currently viewed equivalent unless they match exactly, even if they would be converted to the same. For example, MySQL's "integer" data type would be converted to Oracle's "number," but the differ isn't quite smart enough yet to figure this out. Also, as the SQL to ALTER a field definition varies from database vendor to vendor, these statements are made using just the keyword "CHANGE" and will likely need to be corrected for the target database.

It appears to me that the modification statements will provide information one-SMOP from that for which you've asked (i.e., some further effort required; batteries not included).

Update: And if that's not the solution, there are several other sections of the doc (manual) that look relevant, including "EXTRACT SQL SCHEMAS DIRECTLY FROM DATABASE," "AUTOMATED CODE-GENERATION" and 'SQLFAIRY SCRIPTS" (which refers you to separate perldocs for several possibly useful approaches).


++$anecdote ne $data



In reply to Re^3: SQL::Translator, sqlt-diff confusion by ww
in thread SQL::Translator, sqlt-diff confusion by Anonymous Monk

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.