Обновить dags/OSV_with_docs.py

This commit is contained in:
bn_user 2025-12-03 07:41:01 +00:00
parent 4cd9136842
commit ebc27f1295
1 changed files with 6 additions and 6 deletions

View File

@ -324,13 +324,13 @@ def pogasheniya(**kwargs):
conn.execute(""" conn.execute("""
INSERT INTO public.pogasheniya (schet, uid_dogovor, name, nomer, date_begin, date_end) INSERT INTO public.pogasheniya (schet, uid_dogovor, name, nomer, date_begin, date_end)
SELECT * FROM temp_pogasheniya SELECT * FROM temp_pogasheniya
ON CONFLICT (schet, uid_dogovor)
DO UPDATE SET
name = EXCLUDED.name,
nomer = EXCLUDED.nomer,
date_begin = EXCLUDED.date_begin,
date_end = EXCLUDED.date_end
""") """)
# ON CONFLICT (schet, uid_dogovor)
# DO UPDATE SET
# name = EXCLUDED.name,
# nomer = EXCLUDED.nomer,
# date_begin = EXCLUDED.date_begin,
# date_end = EXCLUDED.date_end
conn.execute(""" conn.execute("""
UPDATE public.pogasheniya fp UPDATE public.pogasheniya fp
SET id = subquery.new_id SET id = subquery.new_id