mirror of
https://github.com/DependencyTrack/dependency-track.git
synced 2025-10-19 07:53:18 +00:00
Merge pull request #5418 from stohrendorf/speed-up-vulnerablesoftware-normalization
This commit is contained in:
commit
389377f46b
1 changed files with 7 additions and 1 deletions
|
@ -43,7 +43,13 @@ public class v4135Updater extends AbstractUpgradeItem {
|
||||||
try (final Statement statement = connection.createStatement()) {
|
try (final Statement statement = connection.createStatement()) {
|
||||||
LOGGER.info("Normalizing \"VULNERABLESOFTWARE\" CPE columns");
|
LOGGER.info("Normalizing \"VULNERABLESOFTWARE\" CPE columns");
|
||||||
statement.execute(/* language=SQL */ """
|
statement.execute(/* language=SQL */ """
|
||||||
UPDATE "VULNERABLESOFTWARE" SET "PART" = LOWER("PART"), "VENDOR" = LOWER("VENDOR"), "PRODUCT" = LOWER("PRODUCT")
|
UPDATE "VULNERABLESOFTWARE"
|
||||||
|
SET "PART" = LOWER("PART"),
|
||||||
|
"VENDOR" = LOWER("VENDOR"),
|
||||||
|
"PRODUCT" = LOWER("PRODUCT")
|
||||||
|
WHERE "PART <> LOWER("PART")
|
||||||
|
OR "VENDOR <> LOWER("VENDOR")
|
||||||
|
OR "PRODUCT <> LOWER("PRODUCT")"
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue