Changes between Initial Version and Version 2 of Ticket #36592
- Timestamp:
- Sep 3, 2025, 6:19:00 PM (44 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36592
- Property Summary Incorrect warning when specifying a UniqueConstraint with SQLite and nulls_distinct=True → Incorrect warning when specifying a UniqueConstraint with SQLite and nulls_distinct=False
-
Ticket #36592 – Description
initial v2 2 2 3 3 When I migrate my sqlite database I get this warning: 4 ``` 4 5 {{{ 5 6 SQLite does not support unique constraints with nulls distinct. 6 ``` 7 }}} 8 9 7 10 I suspect this is a bug, since I specified that nulls should not be distinct. 8 11 … … 10 13 11 14 Here is the simplest model I could come up with that shows the issue: 12 ``` 15 {{{ 13 16 class SimpleModel(models.Model): 14 17 field_a = models.IntegerField(null=True) … … 23 26 ), 24 27 ] 25 ``` 28 }}} 26 29 The full warning I see on migration is: 27 ``` 30 {{{ 28 31 WARNINGS: 29 32 dances.SimpleModel: (models.W047) SQLite does not support unique constraints with nulls distinct. 30 33 HINT: A constraint won't be created. Silence this warning if you don't care about it. 31 ``` 34 }}} 32 35 and, as I said before, I get the same warning if I use `nulls_distinct=True` (which is when I expect to see the warning).