Change schema of an entity with events in Doctrine ORM

Code
<?php

use Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs;
use 
Doctrine\ORM\Tools\SchemaTool;
use 
Doctrine\ORM\Tools\ToolEvents;
use 
PHPSnippets\Db\Entity\Test;

$listener = new class() {
    public function 
postGenerateSchemaTable(GenerateSchemaTableEventArgs $event) : void
    
{
        
$table $event->getClassTable();
        if (
$table->getName() === 'test') {
            
$table->addColumn('column_of_event''boolean');
        }
    }
};

$entityManager->getEventManager()
    ->
addEventListener(ToolEvents::postGenerateSchemaTable$listener);


$tool = new SchemaTool($entityManager);

$testEntityMetadata $entityManager->getClassMetadata(Test::CLASS);
dump(
    
'Column names of entity class Test:',
    
$testEntityMetadata->columnNames
);

$queries $tool->getCreateSchemaSql([$testEntityMetadata]);

echo 
SqlFormatter::format($queries[0]);
Result
"Column names of entity class Test:"
array:3 [
  "id" => "id"
  "name" => "name"
  "creationDate" => "creation_date"
]
CREATE TABLE test (
  id INT AUTO_INCREMENT NOT NULL, 
  name VARCHAR(255) NOT NULL, 
  creation_date DATETIME DEFAULT NULL, 
  column_of_event TINYINT(1) NOT NULL, 
  PRIMARY KEY(id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6