def _drop_constraint(constraint, autogen_context):
"""
Generate Alembic operations for the ALTER TABLE ... DROP CONSTRAINT
of a :class:`~sqlalchemy.schema.UniqueConstraint` instance.
"""
text = "%(prefix)sdrop_constraint(%(name)r, '%(table)s')" % {
'prefix': _alembic_autogenerate_prefix(autogen_context),
'name': constraint.name,
'table': constraint.table,
}
return text
评论列表
文章目录