Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-789

Default value not allowed on blob/text

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.2
    • Fix Version/s: 2.5
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None
    • Environment:
      LAMP

      Description

      introduced between v2.4.1 and v2.4.2

      Doctrine is trying to set a default value on a LONGTEXT, it is not allowed in MySQL and ignored - resulting in an invalid schema and migration generating the same migration over and over again.

      mysql> ALTER TABLE creative CHANGE filename filename LONGTEXT DEFAULT '' NOT NULL;
      Query OK, 0 rows affected, 1 warning (0.01 sec)
      Records: 0 Duplicates: 0 Warnings: 1

      mysql> show warnings;
      -------------------------------------------------------------------

      Level Code Message

      -------------------------------------------------------------------

      Warning 1101 BLOB/TEXT column 'filename' can't have a default value

      -------------------------------------------------------------------
      1 row in set (0.00 sec)

        Activity

        Hide
        Steve Müller added a comment -

        Thank you for reporting this issue. Patch supplied in PR: https://github.com/doctrine/dbal/pull/514

        Show
        Steve Müller added a comment - Thank you for reporting this issue. Patch supplied in PR: https://github.com/doctrine/dbal/pull/514
        Hide
        Doctrine Bot added a comment -

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

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

          People

          • Assignee:
            Steve Müller
            Reporter:
            Klaus Jørgensen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: