Provide unique constraints on all tables
- add unique indexes on (`column`, `deleted`), and set `deleted`=`id` instead of `deleted`=1 after delete.
- handle duplicate key errors.
- add missing unique constraints to models
Blueprint information
- Status:
- Complete
- Approver:
- John Griffith
- Priority:
- Low
- Drafter:
- Viktor Serhieiev
- Direction:
- Approved
- Assignee:
- Roman Podoliaka
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Started
- Milestone target:
- None
- Started by
- Viktor Serhieiev
- Completed by
- Sean McGinnis
Related branches
Related bugs
Sprints
Whiteboard
(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.
⬥ Tables that should have UC:
⚒ quotas
UC on columns (project_id, resource, deleted). Based on quota_get() api function
⚒ quota_classes
UC on (class_name, resource, deleted). Based on quota_class_get() api function
- quota_usages
UC on (project_id, resource, deleted). Based on quota_usage_get() api function
- reservations
UC on (uuid, deleted). Based on reservation_get() api function
- services
UC on columns
(topic, disabled, deleted, host) - based on service_
(host, binary, deleted) - based on service_
- iscsi_targets
UC on (volume_id, deleted). Based on volume_
- volume_metadata
UC on (volume_id, key, deleted). Based on volume_
- volume_types
UC on (name, deleted). Based on volume_
- volume_
UC on (volume_type_id, key, deleted). Based on volume_
Gerrit topic: https:/
Addressed by: https:/
Change column type from boolean to `id` type.
Addressed by: https:/
Added unique constarint to quotas table.
Addressed by: https:/
Added unique constarint to quota_classes table.
Work Items
Dependency tree
* Blueprints in grey have been implemented.