#110424Introspect the schema through the non-deprecated doctrine API
Description
TYPO3 customized database schema introspection by overriding the portable hook methods in extended doctrine schema managers, which restored behaviour doctrine/dbal 4 had removed together with the doctrine event system.
Those hooks belong to AbstractSchemaManager::listTables(), which doctrine/dbal 4.4 marks as deprecated in favour of the new introspect API. The replacement path resolves metadata through AbstractPlatform::createMetadataProvider() and never calls the legacy hooks. As soon as the deprecated path is removed upstream, the TYPO3 customization would stop being applied silently: column comments would no longer override doctrine types, SET values and MySQL index prefix lengths would be lost from the comparison, all without raising an error.
Fix
Move introspection to the introspect API.
ConnectionMigratorassembles the schema fromintrospectTables()andintrospectSequences()instead of callingintrospectSchema(), which still routes throughlistTables().SchemaInformationusesintrospectTableColumnsByUnquotedName()instead of the deprecatedlistTableColumns().- The extended schema managers post-process the introspected tables and columns instead of overriding the removed hooks. Doctrine columns are mutable, so nothing has to be rebuilt for this.
Decorating the platform metadata provider would have been the more direct extension point, but is not possible: the platforms narrow the return type of createMetadataProvider() to their concrete provider class, and those are declared final readonly.
Two adjustments keep the comparison result identical: SET column values are not carried on the introspected column and are read from the information schema separately, with the query only issued for tables actually using a SET column; and MySQL index prefix lengths are reported as a separate lengths index option, while TYPO3 compares them concatenated to the column name, matching the ext_tables.sql notation.
Why this is not a pure rename
introspectTables() reports index columns as the statement that created them spelled them, where the deprecated path normalized them away. On SQLite that difference makes a schema update never finish: it rebuilds a table to alter it, works out which indexes the rebuilt table keeps by resolving their columns against the columns of the table, and drops the ones it cannot resolve although they were no part of the change. The next comparison offers them again, and that rebuild drops the ones just added.
Index columns are therefore normalized where the current schema is read, and only there – the expected side stays quoted, because PostgreSQL folds an unquoted identifier to lower case.
Patch
Gerrit 95189, topic database-analyzer.
Releases: main, 14.3, 13.4
Reviews 1
History 09
-
Gerrit Code Review pushed patch set 3 for main to change 95189 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-11T04:00:59+00:00" > 08/11/26, 04:00 </span> -
Gerrit Code Review pushed patch set 4 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-11T05:17:37+00:00" > 08/11/26, 05:17 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-11T11:38:29+00:00" > 08/11/26, 11:38 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-11T13:29:36+00:00" > 08/11/26, 13:29 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-11T14:14:17+00:00" > 08/11/26, 14:14 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-14T20:48:59+00:00" > 08/14/26, 20:48 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 95189 <span data-processor="relativetime" data-value="2026-08-31T10:29:06+00:00" > 08/31/26, 10:29 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 95189 <span data-processor="relativetime" data-value="2026-09-02T10:40:48+00:00" > 09/02/26, 10:40 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 95189 <span data-processor="relativetime" data-value="2026-09-02T13:16:41+00:00" > 09/02/26, 13:16 </span>