         a_ref.table_name AS ref_table_name,
         a_ref.column_name AS ref_column_name,
         LISTAGG(ac.column_name, ','||chr(10)||'    ') WITHIN GROUP (ORDER BY ac.position) AS fk_columns,
-        count(ac.column_name) AS column_count,
         citydb_delete_gen.check_for_cleanup(a_ref.table_name, a_ref.owner) AS cleanup_ref_table
       FROM
         all_constraints c

    )
  IS
    ddl_command VARCHAR2(10000) := 
      'CREATE OR REPLACE FUNCTION '||schema_name||'.delete_'||get_short_name(lower(tab_name))||'_batch(arr ID_ARRAY) RETURN ID_ARRAY'
      ||chr(10)||'IS'||chr(10);
    declare_block VARCHAR2(500) := '  deleted_ids ID_ARRAY;';
    pre_block VARCHAR2(2000) := '';

    schema_name VARCHAR2 := USER
    ) RETURN VARCHAR2 
  IS
    parent_table VARCHAR2(30);
  BEGIN
    SELECT
      p.table_name
