Skip to content

Loading…

DBAL-789: Default value not allowed on blob/text #2019

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user jrgensen:

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)

@doctrinebot

Comment created by @deeky666:

Thank you for reporting this issue. Patch supplied in PR: #514

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-514] was closed:
#514

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@deeky666 deeky666 was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.