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()