From d3372cae1b130f216c9e4bc2e99b01ad34e74708 Mon Sep 17 00:00:00 2001 From: bn_user Date: Tue, 2 Dec 2025 14:31:10 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20dags/OSV=5Fwith=5Fdocs.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/OSV_with_docs.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dags/OSV_with_docs.py b/dags/OSV_with_docs.py index 4e3525b..f0d14e5 100644 --- a/dags/OSV_with_docs.py +++ b/dags/OSV_with_docs.py @@ -331,18 +331,18 @@ def pogasheniya(**kwargs): date_begin = EXCLUDED.date_begin, date_end = EXCLUDED.date_end """) - # conn.execute(""" - # UPDATE public.pogasheniya fp - # SET id = subquery.new_id - # FROM ( - # SELECT - # id, - # ROW_NUMBER() OVER (ORDER BY uid_dogovor, schet, nomer) as new_id - # FROM public.pogasheniya - # ) AS subquery - # WHERE fp.id = subquery.id; - # """ - # ) + conn.execute(""" + UPDATE public.pogasheniya fp + SET id = subquery.new_id + FROM ( + SELECT + id, + ROW_NUMBER() OVER (ORDER BY uid_dogovor, schet, nomer) as new_id + FROM public.pogasheniya + ) AS subquery + WHERE fp.id = subquery.id; + """ + ) return 'Список обновлен.' else: return 'Обновлять нечего.'