- args:
    cascade: true
    read_only: false
    sql: |-
      CREATE OR REPLACE FUNCTION public.calculate_job_line()
       RETURNS trigger
       LANGUAGE plpgsql
      AS $function$
      DECLARE
        _new record;
      BEGIN
        _new := NEW;
       _new."price_diff" = _new."db_price" - _new."act_price";
      _new."price_diff_pc" = (_new."db_price" - _new."act_price") / _new."db_price";
        _new."updated_at" = NOW();
        RETURN _new;
      END;
      $function$
      ;
  type: run_sql
