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
?
Migrations are a type of version control for your database. They allow a team to modify the database schema and stay up to date on the current schema state. Migrations are typically paired with the Schema Builder to easily manage your database's schema. Note.
The process of database migration can involve multiple phases and iterations, including assessing the current databases and future needs of the company, migrating the schema, and normalizing and moving the data. Plus, testing, testing, and more testing.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With