Drop ON CONFLICT (no unique constraint on hostname)

This commit is contained in:
Pierre & Lumière 2026-04-14 13:39:11 +02:00
parent 2215067987
commit c6113bc537

View File

@ -129,16 +129,6 @@ def main():
VALUES VALUES
(:hostname, :fqdn, :domain_ltd, :os_family, :os_version, :machine_type, (:hostname, :fqdn, :domain_ltd, :os_family, :os_version, :machine_type,
:etat, :site, :vcenter_vm_name, :responsable_nom, :patch_owner_details) :etat, :site, :vcenter_vm_name, :responsable_nom, :patch_owner_details)
ON CONFLICT (hostname) DO UPDATE SET
fqdn = EXCLUDED.fqdn,
domain_ltd = EXCLUDED.domain_ltd,
os_family = EXCLUDED.os_family,
os_version = EXCLUDED.os_version,
etat = EXCLUDED.etat,
site = EXCLUDED.site,
vcenter_vm_name = EXCLUDED.vcenter_vm_name,
responsable_nom = EXCLUDED.responsable_nom,
patch_owner_details = EXCLUDED.patch_owner_details
"""), params) """), params)
sp.commit() sp.commit()
inserted += 1 inserted += 1