From f4282ea416ca62b622f84344a786a2bb8abee458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ou=C5=A1ek?= <brousek@ics.muni.cz> Date: Wed, 24 Apr 2024 10:24:36 +0200 Subject: [PATCH] fix: correct ON CONFLICT in oracle2postgresql --- perun/proxy/utils/oracle2postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perun/proxy/utils/oracle2postgresql.py b/perun/proxy/utils/oracle2postgresql.py index 62ee832..079b0fa 100644 --- a/perun/proxy/utils/oracle2postgresql.py +++ b/perun/proxy/utils/oracle2postgresql.py @@ -171,7 +171,7 @@ class Oracle2PostgreSQL: insert_text = text( f'INSERT INTO "{self.table_for_imported_attributes}" (uid, attribute, value) ' "VALUES (:uid, :attribute, :value) " - "ON CONFLICT (id) DO UPDATE SET id = EXCLUDED.id" + "ON CONFLICT (uid,attribute,sp,expires) DO NOTHING" ) with self.postgresql_engine.begin() as conn: for username in usernames: -- GitLab