Project

General

Profile

Development #7357

models,a2_rbac/models: add partial indexes on models linked to ou or services

Added by Benjamin Dauvergne about 4 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
26 May 2015
Due date:
% Done:

100%

Patch proposed:
No
Planning:
No

Description

Django, SQLite and Postgres does not allow to create unique indexes on NULLable columns. It's technically possible using partial indexes looking like CREATE UNIQUE INDEX xxx ON table(col1, col2) WHERE col3 IS NULL.

The slug of those models should be unique also when ou_id or service_id is NULL. Also add improved clean method to look for duplicates with better error messages.

Associated revisions

Revision 996b975a (diff)
Added by Benjamin Dauvergne about 4 years ago

models,a2_rbac/models: add partial indexes on models linked to ou or services (fixes #7357)

The slug of those models should be unique also when ou_id or service_id
is NULL. Also add improved clean method to look for duplicates with
better error messages.

History

#1 Updated by Benjamin Dauvergne about 4 years ago

  • % Done changed from 0 to 100
  • Status changed from Nouveau to Résolu (à déployer)

#2 Updated by Benjamin Dauvergne over 3 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

#3 Updated by Benjamin Dauvergne over 1 year ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF