def batch_create_check_constraint(
cls, operations, constraint_name, condition, **kw):
"""Issue a "create check constraint" instruction using the
current batch migration context.
The batch form of this call omits the ``source`` and ``schema``
arguments from the call.
.. seealso::
:meth:`.Operations.create_check_constraint`
.. versionchanged:: 0.8.0 The following positional argument names
have been changed:
* name -> constraint_name
"""
op = cls(
constraint_name, operations.impl.table_name,
condition, schema=operations.impl.schema, **kw)
return operations.invoke(op)
评论列表
文章目录