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 Done
    • Stefan Bürk +2
    • Thomas Hohn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Thomas Hohn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 79

  1. Stefan Bürk uploaded patch set 1 03/07/23, 05:21

  2. core-ci voted on patch set 1 V +1 03/07/23, 05:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38573

  3. Stefan Bürk commented on patch set 1 03/07/23, 05:30

  4. core-ci commented on patch set 1 03/07/23, 06:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38574

  5. Thomas Hohn voted on patch set 1 CR +1 03/07/23, 06:09

  6. Benni Mack commented on patch set 1 V +1 CR +1 03/07/23, 06:55

    sorry, forgot about that!
  7. Thomas Hohn voted on patch set 1 V +1 03/07/23, 07:11

  8. Stefan Bürk voted on patch set 1 V +2 CR +2 03/07/23, 07:11

  9. Stefan Bürk merged patch set 2 03/07/23, 07:11