Re: patterns for automated tests of migrations

2016-12-11 Thread Chris Withers
Hi Tom, This is certainly interesting, but even more heavyweight than I was looking for ;-) I love the idea of really making sure the schema that results from running all the migrations is the same as the one from doing a create_all with your metadata. Does alembic have anything like django's

Re: patterns for automated tests of migrations

2016-11-23 Thread Tom Lazar
hi chris, here’s how we do it in all our projects: https://github.com/pyfidelity/rest-seed/blob/master/backend/backrest/tests/test_migrations.py basically, our migrations start with an empty database, so we run them, dump the resulting SQL, then create a new database using the `metadata.create_

patterns for automated tests of migrations

2016-11-23 Thread Chris Withers
Hi All, How do you go about writing automated tests for a migration? I don't often do this, but when migrations involve data, I prefer to but now I don't know how ;-) There's nothing in the docs, right? (or am I missing something obvious) cheers, Chris -- You received this message because y

patterns for automated tests of migrations

2016-11-23 Thread Chris Withers
Hi All, How do you go about writing automated tests for a migration? I don't often do this, but when migrations involve data, I prefer to but now I don't know how ;-) There's nothing in the docs, right? (or am I missing something obvious) cheers, Chris -- You received this message because y