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 #1

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78043

Actions #2

Updated by Stefan Bürk about 1 year ago

Actions #3

Updated by Stefan Bürk about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Oliver Bartsch about 1 year ago

  • Related to Task #100156: Set TCA default for type "json" via TcaPreparation added
Actions #5

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF