As a component can exists multiple times in the db (one time with the property enabled to true, and others with the property enabled to false), it's more complex to get a component by its key : if the component still exists we can return the one with enabled true, but if it has been removed more than one times we don't know which one to return.
The goal is now to have only one entry for a component. If a component has been removed and recreated, we have to update to enabled property to true.
For the migration of existing duplicated components :
- If a enabled one is found : we remove all disabled components and update issues linked to them to the enabled component
- If only disabled ones are found, we remove them all except one and move issues of removed components to the component we kept.
The existing index PROJECTS.PROJECTS_KEE must be updated to only use the PROJECTS.KEE column (instead of PROJECTS.KEE and PROJECT.ENABLED)