fix: remove conversation_id update logic from cambios_plan trigger
This commit is contained in:
@@ -181,12 +181,6 @@ begin
|
|||||||
'ACTUALIZACION'::public.tipo_cambio, 'tipo_origen', to_jsonb(old.tipo_origen), to_jsonb(new.tipo_origen), null);
|
'ACTUALIZACION'::public.tipo_cambio, 'tipo_origen', to_jsonb(old.tipo_origen), to_jsonb(new.tipo_origen), null);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
||||||
if (new.conversation_id is distinct from old.conversation_id) then
|
|
||||||
insert into public.cambios_plan values (gen_random_uuid(), new.id, new.actualizado_por, now(),
|
|
||||||
'ACTUALIZACION'::public.tipo_cambio, 'conversation_id', to_jsonb(old.conversation_id), to_jsonb(new.conversation_id), null);
|
|
||||||
end if;
|
|
||||||
|
|
||||||
-- 🔥 consumirlo para que NO se guarde en planes_estudio
|
-- 🔥 consumirlo para que NO se guarde en planes_estudio
|
||||||
if v_response_id is not null then
|
if v_response_id is not null then
|
||||||
new.meta_origen := new.meta_origen - 'response_id';
|
new.meta_origen := new.meta_origen - 'response_id';
|
||||||
|
|||||||
Reference in New Issue
Block a user