Drop ON CONFLICT (no unique constraint on hostname)
This commit is contained in:
parent
2215067987
commit
c6113bc537
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user