Skip to content

text DEFAULT '' NOT NULL in ext_tables.sql is invalid on MySQL, database compare cannot be applied #1409

Description

@janus-reith

Since 12.6.1, ext_tables.sql declares various columns with a literal default on a TEXT type.
This was introduced in f9d8d18 ("[BUGFIX] Make powermail work with supported db versions"), shipped in 12.6.1. 12.6.0 did not contain these defaults.

On MySQL, BLOB/TEXT columns cannot have a literal default value. Since MySQL 8.0.13 a default is only accepted as an expression, e.g. DEFAULT (''), which is a different syntax. MariaDB (10.2.1+) accepts the literal form, which is presumably why this passed testing there.

Applying the change via the database analyzer reports success but has no effect on the default, so the columns are re-reported indefinitely.

This was already pointed out in #1364 (comment) and it seems to be the same case in the latest releases targeting v13. #1342 (comment) mentions a fix that was tested on MySQL 8.0 / 8.4, but I'm not sure if the post drew the right conclusions what changed in 8.0.13.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions