File size: 863 Bytes
4b3a33f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- remove_triggers_for_profile_embeddings.sql
-- Run this in your Supabase SQL Editor to completely disable the triggers
-- causing the "embedding generation failed" error.

-- 1. Drop the trigger that refreshes recommendations
DROP TRIGGER IF EXISTS on_profile_embedding_change ON public.profile_embeddings;

-- 2. Drop the redundant webhook trigger
DROP TRIGGER IF EXISTS on_profile_embedding_upsert ON public.profile_embeddings;

-- 3. Drop the function that refreshes recommendations
DROP FUNCTION IF EXISTS public.trg_refresh_recommendations_for_user CASCADE;

-- 4. Drop the function for the webhook trigger
DROP FUNCTION IF EXISTS public.trg_on_profile_embedding_update CASCADE;

-- Now the Python upsert:
-- client.table("profile_embeddings").upsert(payload).execute()
-- will run purely as a database insert without any hidden functions interrupting it.