private function getColumnTypes(): void
  {
    $rows = DataLayer::getAllTableColumns();
    foreach ($rows as $row)
    {
      $key = '@'.$row['table_name'].'.'.$row['column_name'].'%type@';
      $key = strtoupper($key);

      $value = $row['column_type'];
      if (isset($row['character_set_name'])) $value .= ' character set '.$row['character_set_name'];

      $this->replacePairs[$key] = $value;
    }

    $this->io->text(sprintf('Selected %d column types for substitution', sizeof($rows)));
  }
private function getColumnTypes(): void
  {
    $rows = DataLayer::getAllTableColumns();
    foreach ($rows as $row)
    {
      $key = '@'.$row['table_name'].'.'.$row['column_name'].'%type@';
      $key = strtoupper($key);

      $value = $row['column_type'];
      if (isset($row['character_set_name'])) $value .= ' character set '.$row['character_set_name'];

      $this->replacePairs[$key] = $value;
    }

    $this->io->text(sprintf('Selected %d column types for substitution', sizeof($rows)));
  }
private function getColumnTypes ( ) : void { $ rows = DataLayer :: getAllTableColumns ( ) ; foreach ( $ rows as $ row ) { $ key = '@' . $ row [ 'table_name' ] . '.' . $ row [ 'column_name' ] . '%type@' ; $ key = strtoupper ( $ key ) ; $ value = $ row [ 'column_type' ] ; if ( isset ( $ row [ 'character_set_name' ] ) ) $ value .= ' character set ' . $ row [ 'character_set_name' ] ; $ this -> replacePairs [ $ key ] = $ value ; } $ this -> io -> text ( sprintf ( 'Selected %d column types for substitution' , sizeof ( $ rows ) ) ) ; }
Selects schema, table, column names and the column type from MySQL and saves them as replace pairs.
Selects schema table column names and the column type from MySQL and saves them as replace pairs .