From dab13f15f4534bcba22693d28fab0357ebc5776e Mon Sep 17 00:00:00 2001 From: Kyle Bebak Date: Fri, 17 May 2024 09:34:03 -0600 Subject: [PATCH] - Add optional nulls_distinct arg to UniqueConstraint, which maps to NULLS NOT DISTINCT in SQL - See https://code.djangoproject.com/ticket/34701 - Also https://www.postgresql.org/docs/current/indexes-unique.html --- django-stubs/db/models/constraints.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/django-stubs/db/models/constraints.pyi b/django-stubs/db/models/constraints.pyi index c9bf03501..61435013c 100644 --- a/django-stubs/db/models/constraints.pyi +++ b/django-stubs/db/models/constraints.pyi @@ -61,4 +61,5 @@ class UniqueConstraint(BaseConstraint): include: str | Sequence[str] | None = ..., opclasses: Sequence[str] = ..., violation_error_message: str | None = ..., + nulls_distinct: bool | None = ..., ) -> None: ...