Review main Merged

78043[BUGFIX] Avoid invalid default for auto-created json field

Stefan Bürk CR +2 V +2 Easy +0 −1 updated 03/07/23, 07:11

Commit message

With #100088 the `json` field handling has been changed from
TCA `dbType = json` to `type = json` along with automatic db
field creation, if not provided by `ext_tables.sql`.

`\TYPO3\CMS\Core\Database\Schema\DefaultTcaSchema` has been
changed to create a native json field with the default value
of '[]' if not manually provided. MariaDB allows setting of
default value for `text` and `json`fields, the competitor
`MySQL` not. Many developers are not aware of this difference.
`doctrine/dbal` does not help to avoid invalid field defaults.

This change removes the default value for json field in the
`DefaultTcaSchema` to restore cross database compatibility
with `MySQL` again.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 1