public function new_id($table, int $min = 1){
    $tab = $this->modelize($table);
    if ( \count($tab['keys']['PRIMARY']['columns']) !== 1 ){
      die("Error! Unique numeric primary key doesn't exist");
    }
    if (
      ($id_field = $tab['keys']['PRIMARY']['columns'][0]) &&
      ($maxlength = $tab['fields'][$id_field]['maxlength'] )&&
      ($maxlength > 1)
    ){
      $max = (10 ** $maxlength) - 1;
      if ( $max >= mt_getrandmax() ){
        $max = mt_getrandmax();
      }
      if ( ($max > $min) && ($table = $this->tfn($table, true)) ){
        $i = 0;
        do {
          $id = random_int($min, $max);
          /** @todo */
          /*
          if ( strpos($tab['fields'][$id_field]['type'], 'char') !== false ){
            $id = substr(md5('bbn'.$id), 0, random_int(1, 10 ** $maxlength));
          }
          */
          $i++;
        }
        while ( ($i < 100) && $this->select($table, [$id_field], [$id_field => $id]) );
        return $id;
      }
    }
    return null;
  }