fix vcenter update task to avoid re-adding update records for previous updates
This commit is contained in:
@@ -75,6 +75,10 @@ RETURNING *;
|
||||
SELECT * FROM "Updates"
|
||||
ORDER BY "UpdateTime";
|
||||
|
||||
-- name: GetVmUpdates :many
|
||||
SELECT * FROM "Updates"
|
||||
WHERE "UpdateType" = sqlc.arg('updateType') AND "InventoryId" = sqlc.arg('InventoryId');
|
||||
|
||||
-- name: CleanupUpdates :exec
|
||||
DELETE FROM "Updates"
|
||||
WHERE "UpdateType" = sqlc.arg('updateType') AND "UpdateTime" <= sqlc.arg('updateTime')
|
||||
|
Reference in New Issue
Block a user