Aha, thanks for that. For the benefit of anyone who comes across this
later, my final script looked much like this:
def downgrade():
try:
inner_transaction = op.get_bind().begin_nested() # establish a
savepoint
with op.batch_alter_table("user_authentication_method") as batch_
On 04/20/2016 07:42 AM, Ben Sizer wrote:
I had an unnamed UniqueConstraint, and autogenerated upgrade scripts
that passed in None as the name - these worked perfectly. Now I am
discovering that the downgrade doesn't work, as there is no name to
refer to the constraint (i.e. "sqlalchemy.exc.Comp
I had an unnamed UniqueConstraint, and autogenerated upgrade scripts that
passed in None as the name - these worked perfectly. Now I am discovering
that the downgrade doesn't work, as there is no name to refer to the
constraint (i.e. "sqlalchemy.exc.CompileError: Can't emit DROP CONSTRAINT
for