Skip to content
Snippets Groups Projects
Commit 6b437802 authored by Markus Klein's avatar Markus Klein Committed by Daniel Goerz
Browse files

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

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.

Resolves: #89535
Releases: master, 9.5
Change-Id: I78594f1ee0878e8d3f5606901d0abb7fe0023059
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62154


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
parent f1917ab6
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment