-
Story
-
Resolution: Unresolved
-
Normal
-
None
This may require/warrant storing the ID as its own field rather than inside the JSON body, but we may be able to index the field inside the JSON body.
If we store as its own column, we should add this now to avoid a data migration later.
A BindingMapping should also be unique per v2 role and resource, so a compound unique constraint on all of those fields should be added to help catch race conditions. In the meantime, we added locking when binding mappings are created for system roles on the default workspace. This can be removed once this unique constraint is added.
We need to support querying by both the V2 role and alternatively the V1 role, so it's not obvious if the compound index on the resource and v2 role will help in this, or if another compound index is needed, or we're fine with just the FK on the v1 role as enough. A query plan may help us decide.
- relates to
-
RHCLOUD-35354 Update migration code for new V2 models
-
- Backlog
-