I am using migrate
to create SQL database schema and populate it with initial data. Later SQLAlchemy is used to work with this DB.
How could I test that my SQLAlchemy
models are relevant/correct for real DB schema generated by migrate
?
I am using migrate
to create SQL database schema and populate it with initial data. Later SQLAlchemy is used to work with this DB.
How could I test that my SQLAlchemy
models are relevant/correct for real DB schema generated by migrate
?
I didn't test it, but in the features list, this tool seems to do want you want:
http://metacpan.org/pod/SQL::Translator::Manual
*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*
main tool page: http://sqlfairy.sourceforge.net/