Project

General

Profile

Actions

Bug #100101

closed

Avoid invalid default value for auto created native database json field

Added by Stefan Bürk about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2023-03-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #100088: Introduce TCA type jsonClosedOliver Bartsch2023-03-04

Actions
Related to TYPO3 Core - Task #100156: Set TCA default for type "json" via TcaPreparationClosedOliver Bartsch2023-03-13

Actions
Actions

Also available in: Atom PDF