Review main Merged

95188[BUGFIX] Add SQLite JSON and UUID column declarations

Stefan Bürk CR +2 V +2 Normal +193 −11 updated 09/02/26, 10:24

Commit message

Adding a column whose Doctrine type needs a `(DC2Type:<name>)` type
hint - `json` or `uuid` - to an existing table fails on SQLite:

  SQLSTATE[HY000]: General error: 1 error in table a_test_table
  after add column: incomplete input

SQLite renders column comments as `--<comment>` line comments. In
the simplified `ALTER TABLE <table> ADD COLUMN <definition>` form
everything behind `--` is commented out, so the statement ends up
incomplete. This also hits fields generated from TCA through
`DefaultTcaSchema`, which makes it an upgrade blocker rather than
an edge case.

doctrine/dbal guards against this: `getSimpleAlterTableSQL()` falls
back to the table rebuild as soon as a column carries a comment.
TYPO3 never reaches that guard, because the type hint is appended
inside `getColumnDeclarationSQL()`, which runs after the check. The
column itself still has an empty comment at that point.

Instead of adding the hint earlier, the need for it is removed.
SQLite is dynamically typed and reports the declared column type
verbatim through `pragma_table_info`, so dedicated `JSON` and
`UUID` declarations can be used and mapped back on introspection.
No comment is written on SQLite anymore, and the failing statement
form is never generated.

Removing the type comment for SQLite from the platform trait is
part of the fix and not a follow-up cleanup: with the trait still
applied the hint is appended regardless of the declaration, and
the statement keeps failing.

Existing installations are unaffected. Columns created before this
carry `CLOB`/`CHAR(36)` plus the type comment and are resolved to
the same Doctrine type on introspection. Schema comparison uses the
generated column declaration, not the stored database type, so no
change is detected. A functional test covers this.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 6

Review log 2029

Show 24 earlier messages
  1. Stefan Bürk uploaded patch set 1 08/09/26, 21:00

  2. core-ci voted on patch set 1 V +1 08/09/26, 21:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106228

  3. Stefan Bürk rebased onto patch set 2 V +1 08/11/26, 00:32

  4. core-ci voted on patch set 2 V +1 08/11/26, 00:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106352

  1. Stefan Bürk rebased onto patch set 3 V +1 08/11/26, 04:00

  2. core-ci voted on patch set 3 V +1 08/11/26, 04:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106366

  3. Stefan Bürk rebased onto patch set 4 V +1 08/11/26, 05:17

  4. core-ci voted on patch set 4 V +1 08/11/26, 05:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106385

  5. Stefan Bürk rebased onto patch set 5 V +1 08/11/26, 11:38

  6. core-ci voted on patch set 5 V +1 08/11/26, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106416

  7. Stefan Bürk uploaded patch set 6 V +1 08/11/26, 13:29

  8. core-ci voted on patch set 6 V +1 08/11/26, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106432

  9. Stefan Bürk updated the commit message in patch set 7 V +1 08/11/26, 14:14

  10. Stefan Bürk commented on patch set 7 08/11/26, 14:15

    This change is ready for review.
  11. core-ci voted on patch set 7 V +1 08/11/26, 14:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106445

  12. Oliver Klee voted on patch set 7 V +1 08/11/26, 14:32

  13. Stefan Bürk rebased onto patch set 8 V +1 08/14/26, 20:48

  14. core-ci voted on patch set 8 V +1 08/14/26, 20:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106721

  15. Simon Schaufelberger voted on patch set 8 CR +1 V +1 08/15/26, 11:31

  16. Oliver Klee voted on patch set 8 CR +1 V +1 08/17/26, 07:54

  17. Stefan Bürk rebased onto patch set 9 CR +1 V +1 08/31/26, 10:28

  18. core-ci voted on patch set 9 V +1 08/31/26, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107406

  19. Oliver Klee voted on patch set 9 CR +1 08/31/26, 10:41

  20. Simon Schaufelberger voted on patch set 9 CR +1 V +1 08/31/26, 10:42

  21. Oliver Klee voted on patch set 9 V +1 08/31/26, 11:17

  22. Georg Ringer voted on patch set 9 CR +1 V +1 09/01/26, 18:21

  23. Stefan Bürk commented on patch set 9 CR -2 09/01/26, 20:36

    95187: [BUGFIX] Reject indexes over undeclared columns | https://review.typo3.org/c/Packages/TYPO3.CMS/+/95187 needs to be merged first.
  24. Stefan Bürk commented on patch set 9 CR +2 V +2 09/02/26, 10:24

    Reply

    Done
  25. Stefan Bürk merged patch set 10 09/02/26, 10:24