From 347f932a21bd40b706313b4a5fa724b6de4d2e57 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Tue, 10 Mar 2026 09:27:51 -0600 Subject: [PATCH 1/2] Disable JWT verification for openai-webhook-responses function --- supabase/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/config.toml b/supabase/config.toml index ca14823..87d7933 100644 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -57,7 +57,7 @@ uri = "pg-functions://postgres/public/custom_access_token_hook" [functions.openai-webhook-responses] enabled = true -verify_jwt = true +verify_jwt = false import_map = "./functions/openai-webhook-responses/deno.json" # Uncomment to specify a custom file path to the entrypoint. # Supported file extensions are: .ts, .js, .mjs, .jsx, .tsx From b63857d38f6b1b90f923edb3966ade68570d99e5 Mon Sep 17 00:00:00 2001 From: "Roberto.silva" Date: Tue, 10 Mar 2026 09:57:27 -0600 Subject: [PATCH 2/2] Se agrega realtime --- .../migrations/20260310154853_realtime.sql | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 supabase/migrations/20260310154853_realtime.sql diff --git a/supabase/migrations/20260310154853_realtime.sql b/supabase/migrations/20260310154853_realtime.sql new file mode 100644 index 0000000..fc88cbf --- /dev/null +++ b/supabase/migrations/20260310154853_realtime.sql @@ -0,0 +1,43 @@ +drop view if exists "public"."plantilla_asignatura"; + +alter table "public"."asignaturas" drop column "criterios_de_evaluacion"; + +create or replace view "public"."plantilla_asignatura" as SELECT asignaturas.id AS asignatura_id, + struct.id AS estructura_id, + struct.template_id + FROM (public.asignaturas + JOIN public.estructuras_asignatura struct ON ((asignaturas.estructura_id = struct.id))); + + +grant delete on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant insert on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant references on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant select on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant trigger on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant truncate on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant update on table "public"."asignatura_mensajes_ia" to "postgres"; + +grant delete on table "public"."plan_mensajes_ia" to "postgres"; + +grant insert on table "public"."plan_mensajes_ia" to "postgres"; + +grant references on table "public"."plan_mensajes_ia" to "postgres"; + +grant select on table "public"."plan_mensajes_ia" to "postgres"; + +grant trigger on table "public"."plan_mensajes_ia" to "postgres"; + +grant truncate on table "public"."plan_mensajes_ia" to "postgres"; + +grant update on table "public"."plan_mensajes_ia" to "postgres"; + + +alter publication supabase_realtime add table asignatura_mensajes_ia; + +alter publication supabase_realtime add table plan_mensajes_ia; \ No newline at end of file