register type mappings for unknown/unsupported mysql types

This commit is contained in:
Thomas Müller 2014-07-24 12:17:26 +02:00
parent 65c824a2c0
commit 7d60f7a222

View file

@ -17,6 +17,10 @@ class MySQLMigrator extends Migrator {
* @return \Doctrine\DBAL\Schema\SchemaDiff
*/
protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
$platform = $connection->getDatabasePlatform();
$platform->registerDoctrineTypeMapping('enum', 'string');
$platform->registerDoctrineTypeMapping('bit', 'string');
$schemaDiff = parent::getDiff($targetSchema, $connection);
// identifiers need to be quoted for mysql