Remove old version scan reports of trivy (#16262)

Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
He Weiwei 2022-01-25 11:10:04 +08:00 committed by GitHub
parent 210921cd81
commit 4ec1d07c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,2 @@
/* Remove old version scan reports of trivy */
DELETE FROM scan_report WHERE mime_type='application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' AND registration_uuid IN (SELECT uuid FROM scanner_registration WHERE name='Trivy' AND immutable='true');