forked from DependencyTrack/dependency-track
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust
null
handling of collectionLogic
and collectionLogicChanged
Store `ProjectCollectionLogic.NONE` as `NULL`. Reason being that the vast majority of projects will not have a collection logic, and storing `NULL` is cheaper than storing the string `NONE` over and over again. The code and REST API will still treat `NULL` as `NONE`, though. Remove the index on `Project.collectionLogic`. The column has a low cardinality and is only ever queried in `PortfolioMetricsUpdateTask#fetchNextActiveProjectsBatch`. Since this method paginates using the `id` column, the index on `collectionLogic` is never used. Remove the redundant upgrade item since `collectionLogic` columns are expected to remain `NULL` when a project is not a collection. Make `ProjectMetrics.collectionLogicChanged` non-nullable and default to `false`. Prevents tri-state logic. Signed-off-by: nscuro <[email protected]>
- Loading branch information
Showing
4 changed files
with
23 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
src/main/java/org/dependencytrack/upgrade/v4130/v4130Updater.java
This file was deleted.
Oops, something went wrong.