Feature #103154
openIgnore tables during database analysis
0%
Description
Hey,
very often when integrating third party software, said software bypasses TYPO3 internals but also manages tables. For example if you want to implement doctrine migrations you need a table with a specific layout. But also when working with event stores. Most bring their schema and manage tables themselves. It's quite tedious replicating the schema through an ext_tables.sql
. It would be much easier if we could tell the DatabaseAnalyzer to ignore certain tables or a pattern of tables. That would also ease shared hosting where TYPO3 wants to delete wp_
tables.
Updated by Georg Ringer 10 months ago
using xclass for that currently
class SchemaMigrator extends \TYPO3\CMS\Core\Database\Schema\SchemaMigrator { private const TABLES = [ ]; public function getUpdateSuggestions(array $statements, bool $remove = false): array { $updateSuggestions = parent::getUpdateSuggestions($statements, $remove); foreach ($updateSuggestions as $connection => $modifications) { foreach ($modifications as $k => $modificationTypes) { foreach ($modificationTypes as $t => $modification) { foreach (self::TABLES as $table) { if (is_string($modification) && str_contains($modification, $table)) { unset($updateSuggestions[$connection][$k][$t]); } } } } } return $updateSuggestions; } }
Updated by Christian Kuhn 9 months ago
IIRC, the main issue is here that SchemaMigrator & friends are low level stuff used in install tool together with failsafeContainer, and I think this means we can't dispatch events to arbitrary extensions at this point.
I guess we need to investigate if the above statement is still true. If so, the only option to find a solution different than the xclass is probably a typo3-conf-var to blacklist tables (with some wildcards?) by configuration?