Development #7357
models,a2_rbac/models: add partial indexes on models linked to ou or services
Début:
26 mai 2015
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Non
Planning:
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.
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2|996b975ae4ba8cada50f22a0c73b9b2fb282c2b3.
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé
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.