- 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$
      ;
