foreach ($this->transports
as $transport) { if (!
$transport instanceof DoctrineTransport
) { continue;
} if (!
$extraSql =
$transport->
getExtraSetupSqlForTable($table)) { continue;
} // avoid this same listener from creating a loop on this table
$table->
addOption(self::PROCESSING_TABLE_FLAG, true
);
$createTableSql =
$event->
getPlatform()->
getCreateTableSQL($table);
/*
* Add all the SQL needed to create the table and tell Doctrine
* to "preventDefault" so that only our SQL is used. This is
* the only way to inject some extra SQL.
*/
$event->
addSql($createTableSql);
foreach ($extraSql as $sql) { $event->
addSql($sql);
} $event->
preventDefault();