let insert_column = fun table ~name ~comment ~ty ?(nullable = true) () ->
    validate_name_exn name;
    match column_by_name_opt table name with
      | None -> let column = { col_name         = name;
                               col_comment      = comment;
                               col_table        = table;
                               col_type         = ty;
                               col_nullable     = nullable;
                               col_spec_options = Dbf_misc.StringMap.empty;
                               col_spec_ty      = Dbf_misc.StringMap.empty;
                               col_ocaml_ty     = "";
                               col_sql2ml       = "";
                               col_ml2sql       = ""; }
        in
          table.ta_columns <- table.ta_columns @ [column];
          column
      | Some _ ->
          raise (Duplicated_name name)