Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-183

Adding "Unknown Type" to stage deprecated custom type removal

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1.5
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None

      Description

      Today have experienced problem with schema update when a custom type was removed completely from the code.

      Problem was that inside the database column comment the type name was created. Still the type class couldn't be found in the code anymore. So unknownColumnType exception was raised without possibility to update or even drop the schema from doctrine command line calls.

      The idea to fix this globally in DBAL would be to create UnknownType (Doctrine\DBAL\Types\Type instance) which would be returned every time unknown type is requested.

      The new type should throw unknownColumnType exception each time any of it's methods is called.

      Currently I have made workaround for this issue by binding the missing types to UnknownType class created inside my project so the upgrade runs smoothly for other developers as well.

        Activity

        Hide
        gedrox Aigars Gedroics added a comment -

        Closing for issue DBAL-232 which also fixes the problem.

        Show
        gedrox Aigars Gedroics added a comment - Closing for issue DBAL-232 which also fixes the problem.
        Hide
        beberlei Benjamin Eberlei added a comment -

        A related Github Pull-Request [GH-129] was opened
        https://github.com/doctrine/dbal/pull/129

        Show
        beberlei Benjamin Eberlei added a comment - A related Github Pull-Request [GH-129] was opened https://github.com/doctrine/dbal/pull/129
        Hide
        doctrinebot Doctrine Bot added a comment -

        A related Github Pull-Request [GH-406] was closed:
        https://github.com/doctrine/dbal/pull/406

        Show
        doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-406] was closed: https://github.com/doctrine/dbal/pull/406
        Hide
        doctrinebot Doctrine Bot added a comment -

        A related Github Pull-Request [GH-129] was closed:
        https://github.com/doctrine/common/pull/129

        Show
        doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-129] was closed: https://github.com/doctrine/common/pull/129
        Hide
        doctrinebot Doctrine Bot added a comment -

        A related Github Pull-Request [GH-129] was closed:
        https://github.com/doctrine/dbal/pull/129

        Show
        doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-129] was closed: https://github.com/doctrine/dbal/pull/129

          People

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

            Dates

            • Created:
              Updated:
              Resolved: