Agregar conversaciones a la tabla como respaldo #33 #34
@@ -1,23 +1,3 @@
|
|||||||
alter table "public"."conversaciones_plan" add column "nombre" text default ('Chat '::text || CURRENT_DATE);
|
alter table "public"."conversaciones_plan" add column "nombre" text default ('Chat '::text || CURRENT_DATE);
|
||||||
|
|
||||||
alter table "public"."conversaciones_plan" alter column "conversacion_json" set default '[]'::jsonb;
|
alter table "public"."conversaciones_plan" alter column "conversacion_json" set default '[]'::jsonb;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION public.append_conversacion_asignatura(p_id uuid, p_append jsonb)
|
|
||||||
RETURNS void
|
|
||||||
LANGUAGE sql
|
|
||||||
AS $function$
|
|
||||||
update conversaciones_asignatura
|
|
||||||
set conversacion_json = coalesce(conversacion_json, '[]'::jsonb) || p_append
|
|
||||||
where id = p_id;
|
|
||||||
$function$
|
|
||||||
;
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION public.append_conversacion_plan(p_id uuid, p_append jsonb)
|
|
||||||
RETURNS void
|
|
||||||
LANGUAGE sql
|
|
||||||
AS $function$
|
|
||||||
update conversaciones_plan
|
|
||||||
set conversacion_json = coalesce(conversacion_json, '[]'::jsonb) || p_append
|
|
||||||
where id = p_id;
|
|
||||||
$function$
|
|
||||||
;
|
|
||||||
Reference in New Issue
Block a user