We want to design database schema which will have information related to software release and it's mapping -- to which software version it can be updated and downgraded to.
Current database schema -
software_version
------------------------------------------------
ID
version - string
release_notes - string
artifacts_url - string
We have another table where we keeps mapping for those -
software_version_mapping
------------------------------------------------
ID
base_version - foreign key to software_version
update_to_version - foreign key to software_version
This way works for both update and downgrade. But the problem is we have more than 100 version and software_version_mapping
is growing too much since we have to keep mapping with all for new version.
Can I get suggestion on this - how can we minimise the entries in software_version_mapping
which will satisfy conditions like -
- new version can be updated from any / all previous one
- new version can be updated from only selected old versions
- new version can be updated between range of versions
- we should be able to add downgrade mapping as well
Thanks in Advance!
Aucun commentaire:
Enregistrer un commentaire