/**
  * @param string $name Specifies the table name.
  * @param array $columns A list of the table columns.
  * @return Doctrine\DBAL\Schema\Table Returns the table schema.
  */
 public function createTableSchema($name, $columns)
 {
     $schema = new Table($name);
     $primaryKeyColumns = [];
     foreach ($columns as $column) {
         $type = trim($column['type']);
         $typeName = MigrationColumnType::toDoctrineTypeName($type);
         $options = $this->formatOptions($type, $column);
         $schema->addColumn($column['name'], $typeName, $options);
         if ($column['primary_key']) {
             $primaryKeyColumns[] = $column['name'];
         }
     }
     if ($primaryKeyColumns) {
         $schema->setPrimaryKey($primaryKeyColumns);
     }
     return $schema;
 }