Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1126

SchemaTool fails to dropSchema under SQLite due to ForeignKeyContraints checks

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      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
      

        Activity

        Show
        Guilherme Blanco added a comment - Fixed in https://github.com/doctrine/doctrine2/commit/fe66d8bc04de42ab13b83892df11a5ea1533b544

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: