Review main Merged

85551[TASK] Apply `defaultTableOptions` to table columns

Stefan Bürk CR +2 V +2 Normal +48 −14 updated 08/08/24, 17:00

Commit message

If columns do not specify column `collation`/`collate`
or `charset`, databases determine them using a fallback
chain looking into table defaults, schema defaults and
then server defaults.

Reading schema information from the database retrieves
these information on column level directly which makes
a strict comparision impossible which Doctrine DBAL 4
wants to use and which has been disabled during the
upgrade using the Doctrine DBAL 3 way.

To prepare towards enabling the Doctrine DBAL 4 column
compare way, this change ...

* applies the connection `defaultTableOptions`
  to columns on the TYPO3 virtual schema for `MySQL`
  and `MariaDB`.
* applies `collation BINARY` for `StringType`, `TextType`
  and `JsonType` columns for SQLite.

This can be tested by removing the `columnsEqual()` method
from `\TYPO3\CMS\Core\Database\Schema\Comparator`, which
reduces the "failed" changes in the clean database schema
test `CleanSchemaMigrationForAllSystemExtensionTest`.
Except for MySQL/MariaDB where to two decimal field failures
still be found and which will be addressed in dedicated patch.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 811

  1. Stefan Bürk uploaded patch set 1 08/07/24, 19:06

  2. core-ci voted on patch set 1 V +1 08/07/24, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63012

  3. Stefan Bürk uploaded patch set 2 V +1 08/08/24, 12:10

  4. core-ci voted on patch set 2 V +1 08/08/24, 12:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63043

  5. Stefan Bürk wrote 08/08/24, 12:52

    Topic set to doctrine/dbal
  6. Christian Kuhn updated the commit message in patch set 3 V +1 08/08/24, 16:29

  7. Christian Kuhn voted on patch set 3 CR +1 V +1 08/08/24, 16:30

  8. core-ci voted on patch set 3 V +1 08/08/24, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63065

  9. Anja Leichsenring voted on patch set 3 CR +1 V +1 08/08/24, 16:53

  10. Stefan Bürk voted on patch set 3 CR +2 V +2 08/08/24, 17:00

  11. Stefan Bürk merged patch set 4 08/08/24, 17:00