Distinct manifests shouldn't share the same image configuration
Problem
Currently we have a configuration_id
foreign key in manifests
, pointing to a row in manifest_configurations
. This would allow two manifests to share the same configuration without data duplication but we shouldn't allow this. Although it can happen in rare situations (see #61 (comment 328945539)) we should not allow this at the database level. Two distinct manifests represent two distinct images that should therefore have distinct configurations.
Solution
Remove the configuration_id
foreign key from manifests
and add a manifest_id
foreign key to manifest_configurations
with a unique constraint.
Edited by João Pereira