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).
| [reply] [d/l] |
It looks like you decided I was lazy
The root node looks lazy and doesn't have any really good replies yet because it's two sentences in one paragraph, doesn't show input, code, output, error messages, it doesn't describe what has been tried, or what the bigger picture is, and is missing details like: what databases?
To put it more briefly, it doesn't follow the guidelines from How do I post a question effectively? and related nodes on getting help effectively, so the reference to the PerlMonks documentation is pretty ironic.
| [reply] |
| [reply] |