Details
Description
When attempting to $schemaTool->dropSchema($metadatas) using SQLite, it fails because it attempts to fetch for foreign key constraints.
Here is the exception:
PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getListTableForeignKeysSQL' is not supported by platform.' in /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/DBAL/DBALException.php:9
Stack trace:
#0 /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/DBAL/Platforms/AbstractPlatform.php(1839): Doctrine\DBAL\DBALException::notSupported('Doctrine\DBAL\P...')
#1 /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/DBAL/Schema/AbstractSchemaManager.php(261): Doctrine\DBAL\Platforms\AbstractPlatform->getListTableForeignKeysSQL('ProductEntity_P...', NULL)
#2 /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/ORM/Tools/SchemaTool.php(639): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableForeignKeys('ProductEntity_P...')
#3 /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/ORM/Tools/SchemaTool.php(551): Doctrine\ORM\Tools\SchemaTool->getDropSchemaSQL(Array)
#4 /Users/gblanco/Sites/mkx2/core/tests/Tests/Database/AllTests. in /Users/gblanco/Sites/mkx2/core/library/vendors/Doctrine/DBAL/DBALException.php on line 9
Fixed in https://github.com/doctrine/doctrine2/commit/fe66d8bc04de42ab13b83892df11a5ea1533b544