Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-232

Custom commented column type removal causes unknown column type exception

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None

      Description

      Problem happens when initially, as example, there was commented type "foo" registered and used:

      Doctrine\DBAL\Types\Type::addType('foo', 'FooType');
      $em->getConnection()
          ->getDatabasePlatform()
          ->markDoctrineTypeCommented(Doctrine\DBAL\Types\Type::getType('foo'));
      

      When the type usage and declaration is removed, the database schema upgrade fails.
      This is because DBAL reads the comment from the database and tries to find the type 'foo'.

      I suggest ignoring the database column comment and stick to the standard type recognition in case the type is not declared.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Aigars Gedroics
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: