Files
bodyshop/hasura/migrations/1632265756746_run_sql_migration/up.yaml
2021-09-21 17:33:39 -07:00

16 lines
374 B
YAML

- type: run_sql
args:
cascade: false
read_only: false
sql: |-
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$
;