cleanup templates
This commit is contained in:
@@ -644,6 +644,17 @@ func (q *Queries) InventoryCleanup(ctx context.Context, arg InventoryCleanupPara
|
||||
return err
|
||||
}
|
||||
|
||||
const inventoryCleanupTemplates = `-- name: InventoryCleanupTemplates :exec
|
||||
DELETE FROM "Inventory"
|
||||
WHERE "IsTemplate" = "TRUE"
|
||||
RETURNING Iid, Name, Vcenter, VmId, EventKey, CloudId, CreationTime, DeletionTime, ResourcePool, VmType, Datacenter, Cluster, Folder, ProvisionedDisk, InitialVcpus, InitialRam, IsTemplate, PoweredOn, SrmPlaceholder, VmUuid
|
||||
`
|
||||
|
||||
func (q *Queries) InventoryCleanupTemplates(ctx context.Context) error {
|
||||
_, err := q.db.ExecContext(ctx, inventoryCleanupTemplates)
|
||||
return err
|
||||
}
|
||||
|
||||
const inventoryCleanupVcenter = `-- name: InventoryCleanupVcenter :exec
|
||||
DELETE FROM "Inventory"
|
||||
WHERE "Vcenter" = ?1
|
||||
|
Reference in New Issue
Block a user