Fixed #34355 -- Deprecated passing positional arguments to BaseConstraint.

This commit is contained in:
Xavier Fernandez 2023-02-20 14:28:21 +01:00 committed by Mariusz Felisiak
parent 31cd2852cb
commit ad18a0102c
5 changed files with 64 additions and 13 deletions

View file

@ -48,12 +48,16 @@ option.
``BaseConstraint``
==================
.. class:: BaseConstraint(name, violation_error_message=None)
.. class:: BaseConstraint(*, name, violation_error_message=None)
Base class for all constraints. Subclasses must implement
``constraint_sql()``, ``create_sql()``, ``remove_sql()`` and
``validate()`` methods.
.. deprecated:: 5.0
Support for passing positional arguments is deprecated.
All constraints have the following parameters in common:
``name``