Review main Merged

62154[BUGFIX] DefaultTcaSchema must not create SQL for tables not requested

Markus Klein CR +2 V +2 Normal +93 −88 updated 01/12/20, 13:00

Commit message

The DefaultTcaSchema::enrich() function dynamically adds TCA-defined
ctrl-fields to the SQL schema definition for a provided set of tables.

The function used to add these definition for any table that is defined
in TCA, independent whether the table actually exists in any
ext_tables.sql file.
While this behaviour is no problem under the assumption that the
function is always called with the content of all ext_tables.sql files,
this is a problem if the function is called with only a subset of those
ext_tables.sql files. One example is the "extension manager tables"
upgrade in the Install Tool.

Despite the fact that the function was documented that it needs to be
called with the full set of tables, it actually is not strictly
necessary to do so.

This patch changes the requirement for the enrich() function and
changes the behaviour to not dynamically create tables if those are
found in TCA.

Technical detail to the reported bug:
The table definitions created by this class are usually overruled by
whatever might be defined in an ext_tables.sql file. In case of the
upgrade wizard (where only extension manager tables are requested) the
table definitions for all TCA tables were created based on the best
practice suggestions from the core. If the present DB schema (created by
the real ext_tables.sql files) mismatched those suggested definitions a
DB schema change was proposed, hence the wizard kept popping up.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1118

  1. Markus Klein uploaded patch set 1 10/29/19, 13:33

  2. TYPO3com voted on patch set 1 V -1 10/29/19, 14:19 Completed build in 10m 10s on Tue, 29 Oct, 02:19 PM Test Summary: 288 of 48178 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37848

  3. Markus Klein uploaded patch set 2 10/29/19, 14:20

  4. TYPO3com voted on patch set 2 V -1 10/29/19, 14:29 Completed build in 09m 47s on Tue, 29 Oct, 02:29 PM Test Summary: 148 of 48430 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37849

  5. Markus Klein uploaded patch set 3 10/29/19, 14:33

  6. Markus Klein uploaded patch set 4 10/29/19, 14:35

  7. TYPO3com voted on patch set 3 V -1 10/29/19, 14:45 Completed build in 11m 16s on Tue, 29 Oct, 02:45 PM Test Summary: 144 of 48430 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37850

  8. TYPO3com voted on patch set 4 V +1 10/29/19, 14:46 Completed build in 11m 08s on Tue, 29 Oct, 02:46 PM Test Summary: 48071 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37851

  9. Benni Mack voted on patch set 4 V +1 CR +1 12/27/19, 21:10

  10. Markus Klein updated the commit message in patch set 5 12/27/19, 22:28

  11. Benni Mack voted on patch set 5 V +1 CR +1 12/27/19, 22:30

  12. TYPO3com voted on patch set 5 V -1 12/27/19, 23:08 Completed build in 23m 44s on Fri, 27 Dec, 11:08 PM Test Summary: 1 of 69568 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39630

  13. Markus Klein rebased onto patch set 6 12/27/19, 23:12

  14. TYPO3com voted on patch set 5 V +1 12/27/19, 23:29 Completed build in 1h 08m 15s on Fri, 27 Dec, 11:29 PM Test Summary: 69126 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39630

  15. TYPO3com voted on patch set 6 V +1 12/27/19, 23:48 Completed build in 22m 56s on Fri, 27 Dec, 11:48 PM Test Summary: 69128 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39635

  16. Benni Mack voted on patch set 6 V +1 CR +1 12/30/19, 07:52

  17. Daniel Goerz voted on patch set 6 V +2 CR +2 01/12/20, 13:00

  18. Daniel Goerz merged patch set 7 01/12/20, 13:00