cleanup templates
Some checks failed
continuous-integration/drone/push Build is passing
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / End-to-End (push) Has been cancelled
CI / Publish Docker (push) Has been cancelled

This commit is contained in:
2024-10-02 21:23:54 +10:00
parent f9b8e25c2f
commit 9cdde0b278
3 changed files with 17 additions and 1 deletions

View File

@@ -58,6 +58,11 @@ DELETE FROM "Inventory"
WHERE "Vcenter" = sqlc.arg('vc')
RETURNING *;
-- name: InventoryCleanupTemplates :exec
DELETE FROM "Inventory"
WHERE "IsTemplate" = "TRUE"
RETURNING *;
-- name: CreateUpdate :one
INSERT INTO "Updates" (
"InventoryId", "Name", "EventKey", "EventId", "UpdateTime", "UpdateType", "NewVcpus", "NewRam", "NewResourcePool", "NewProvisionedDisk", "UserName", "PlaceholderChange", "RawChangeString"