From 24da885ec28acdda45c4189b3eb5cf64d267a26e Mon Sep 17 00:00:00 2001 From: Prajwal D C Date: Thu, 5 Dec 2024 18:50:42 +0530 Subject: [PATCH] Updated script to change the table owner --- scripts/data_scripts/create_postgres_tables.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/data_scripts/create_postgres_tables.py b/scripts/data_scripts/create_postgres_tables.py index a4afbc338..1149137c2 100644 --- a/scripts/data_scripts/create_postgres_tables.py +++ b/scripts/data_scripts/create_postgres_tables.py @@ -147,5 +147,10 @@ def grant_permissions(cursor, dbname, schema_name, principal_name): grant_permissions(cursor, dbname, "public", function_app_principal_name) conn.commit() +cursor.execute("ALTER TABLE public.conversations OWNER TO azure_pg_admin;") +cursor.execute("ALTER TABLE public.messages OWNER TO azure_pg_admin;") +cursor.execute("ALTER TABLE public.search_indexes OWNER TO azure_pg_admin;") +conn.commit() + cursor.close() conn.close()