Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-183

Adding "Unknown Type" to stage deprecated custom type removal

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor 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
        Aigars Gedroics added a comment -

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

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

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

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

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

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

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

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

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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: