Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fogley's avatar

Support PostrgeSQL's new "UNIQUE NULLS NOT DISTINCT" constraint

With PostgreSQL 15, a tweaked version of the UNIQUE constraint was released that treats NULL values as duplicates across rows.

I couldn't find anything in the source or docs that suggest this already being available.

Sources:

https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS

https://www.postgresql.org/docs/15/release-15.html#id-1.11.6.7.5.3.4

0 likes
3 replies
thierry2015's avatar

I just opened a discussion thread on GitHub (https:// github.com/laravel/framework/discussions/55023 (edit: PR #55025 was merged and should be available in v12.3.0)

Please or to participate in this conversation.