#154 avoid using model classes in Alembic migrations
Merged by dcallagh. Opened by dcallagh.
dcallagh/waiverdb no-result-id-in-model  into  master

Download 154.patch

... otherwise we can never change or remove the columns used in the
migrations. The migrations need to use raw SQL and so-called
"lightweight" table definitions for interacting with the database
instead, according to the state of the schema at the point in time the
migration was written for.

This fixes migration 71b84ccc31bb (result_id -> subject, testcase)
allowing us to drop the result_id column from the model definition. It
will also allow us to write further migrations in future to change/drop
the subject column.

The from e changes are strictly not related to this actual patch... but I found it gave me a nicer error when I was hitting these exceptions. We can use the new from syntax now that we are on Python 3.

+1
and +1 for the "from e", nice

Pull-Request has been merged by dcallagh

Metadata