Issue Feature Closed

#103154Ignore tables during database analysis

Alexander Schnitzler 02/19/24, 17:58 updated 10/17/26, 05:51

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 5

  1. Georg Ringer commented <span data-processor="relativetime" data-value="2024-02-20T16:18:32+00:00" > 02/20/24, 16:18 </span>

    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;
        }
    }
  2. Christian Kuhn commented <span data-processor="relativetime" data-value="2024-03-01T10:43:41+00:00" > 03/01/24, 10:43 </span>

    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?

  3. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-17T05:51:22+00:00" > 10/17/26, 05:51 </span>

    closing in favor of #110761