Files
bodyshop/hasura/migrations/1632265756746_run_sql_migration/up.sql
2021-09-27 09:17:34 -07:00

11 lines
238 B
PL/PgSQL
Executable File

CREATE OR REPLACE FUNCTION public.update_conversation_on_message()
RETURNS trigger
LANGUAGE plpgsql
AS $function$
BEGIN
UPDATE conversations SET updated_at = now() WHERE id = NEW.conversationid;
RETURN NEW;
END;
$function$
;