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).
In reply to Re^3: SQL::Translator, sqlt-diff confusion
by ww
in thread SQL::Translator, sqlt-diff confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |