78109[TASK] Allow NULL for TCA type "json" fields
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Jochen Roth +1
- Stefan Bürk +1
-
Verified V +2 Done
- Oli Bartsch +2
- Jochen Roth +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 4
Files 1
Review log 1113
-
Oli Bartsch uploaded patch set 1 03/13/23, 16:35
-
core-ci voted on patch set 1 V +1 03/13/23, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38884
-
Oliver Klee commented on patch set 1 03/13/23, 16:50
Looks generally very good! There are some unused variables for which I've added comments.TcaPreparation.php:214$table is unused, and we can drop the variable. Ditto for $fieldName. -
Stefan Bürk commented on patch set 1 03/13/23, 17:13
DefaultTCASchema sets `notnullable = true` for TCA type json fields, if not defined in `ext_tables.sql` files. Issues (current state and/or this change): * Database default is not possible (for all database systems) * TCA Default would set a valid default value, but must be done for each field manually - this would also work as default when `DataHandler` is used * Removing TCA default value and using this TcaPreparation approach works in the Backend / form engine - but not when using `DataHandler` * Remove in `DefaultTcaSchema` the `notnullable = true` or flip to false + TCA Preparation without TCA default "would" work for `DataHandler` (writing null values), same for initial reaction records but ensures json for backend ui stuff etc. So, we should at least remove allow null values for the json field with auto TCA schema migrations. Otherwise, I would say we need to keep the manual TCA default value to ensure `DataHandler` compatibility. -
Oli Bartsch uploaded patch set 2
V +103/14/23, 11:07 -
Oli Bartsch commented on patch set 2 03/14/23, 11:10
Reply
All right, as discussed, I changed this to have the column nullable by default.TcaPreparation.php:214ReplyDone -
core-ci voted on patch set 2 V +1 03/14/23, 11:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38912
-
Stefan Bürk voted on patch set 2 V +1 CR +1 03/15/23, 10:00
-
Stefan Bürk voted on patch set 2 V 0 CR 0 03/15/23, 10:10
-
Stefan Bürk commented on patch set 2 V +1 CR +1 03/15/23, 10:27
Thanks. -
Jochen Roth voted on patch set 2 V +1 CR +1 03/15/23, 10:31
-
Oli Bartsch voted on patch set 2 V +2 CR +2 03/15/23, 10:32
-
Oli Bartsch merged patch set 3 03/15/23, 10:32