Changes between Initial Version and Version 1 of Ticket #30916


Ignore:
Timestamp:
Oct 27, 2019, 6:19:09 AM (5 years ago)
Author:
Safwan Rahman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30916 – Description

    initial v1  
    1 case insensitive unique constraint is needed for various purposes like storing emails. In postgresql, its possible to add [https://www.postgresql.org/message-id/c57a8ecec259afdc4f4caafc5d0e92eb@mitre.org, a functional unique index with `Lower`] and it will work as a case insensitive unique constraint. I have tried to implement that functional unique index/constraint in django, but looking at the source it seems that it is not possible to add functional unique index/constraint in django. [https://github.com/django/django/pull/11929, PR 11929] is created for adding functional index, but it seems like it is not possible to create unique functional index with it.
     1Case insensitive unique constraint is needed for various purposes like storing emails. In postgresql, its possible to add [https://www.postgresql.org/message-id/c57a8ecec259afdc4f4caafc5d0e92eb@mitre.org, a functional unique index with `Lower`] and it will work as a case insensitive unique constraint. I have tried to implement that functional unique index/constraint in django, but looking at the source it seems that it is not possible to add functional unique index/constraint in django. [https://github.com/django/django/pull/11929, PR 11929] is created for adding functional index, but it seems like it is not possible to create unique functional index with it.
    22
    33I think there should be a option like `case_insensitive=True` that can be passed to `UniqueConstraint` so the `UniqueConstraint` create a functional unique index with `Lower`.
Back to Top