Skip to content
Snippets Groups Projects
Commit 0fff3594 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

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

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.

Resolves: #100101
Related: #100088
Releases: main
Change-Id: Id49ed0a4212386f68bf92d799abef2307cf32ac3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78043


Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarThomas Hohn <tho@gyldendal.dk>
Tested-by: default avatarThomas Hohn <tho@gyldendal.dk>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent f97d7fe6
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment