mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-03 05:21:38 +01:00
Make sure the revision of execution isn't null during the upgrade (#14085)
Make sure the revision of execution isn't null during the upgrade Fixes #14075 Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
9574f8c3c6
commit
50a1e85095
@ -519,6 +519,9 @@ CREATE TABLE IF NOT EXISTS "report_vulnerability_record" (
|
|||||||
CONSTRAINT fk_report_uuid FOREIGN KEY(report_uuid) REFERENCES scan_report(uuid) ON DELETE CASCADE
|
CONSTRAINT fk_report_uuid FOREIGN KEY(report_uuid) REFERENCES scan_report(uuid) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*make sure the revision of execution isn't null*/
|
||||||
|
UPDATE execution SET revision=0 WHERE revision IS NULL;
|
||||||
|
|
||||||
/*delete the retention execution records whose policy doesn't exist*/
|
/*delete the retention execution records whose policy doesn't exist*/
|
||||||
DELETE FROM retention_execution
|
DELETE FROM retention_execution
|
||||||
WHERE id IN (SELECT re.id FROM retention_execution re
|
WHERE id IN (SELECT re.id FROM retention_execution re
|
||||||
|
Loading…
Reference in New Issue
Block a user