Project

General

Profile

Actions

Task #101235

open

Make additional DB connections optional sometimes, e.g. in case of SchemaMigration

Added by J. Peter M. Schuler 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2023-07-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

While one can expect that the default DB connection for a TYPO3 is always available, there are scenarios where additional databases might not be available temporarily. Especially in case of schema migration this can result in problems, e.g. because a "not so important" additional DB should be ignored, while still wanting the schema migration to take place for the default connection.

A common scenario where this could occur is during deployment when and if the EXT:typo3_console command database:updateschema is run.
Currently, running this command with an unavailable additional DB is not possible as an unhandled exception would be thrown before the actual migration, due to the connection timeout.

So there seems to be the general idea there could be a need to be able to "skip" additional databases in some scenarios, most probably (but perhaps in other cases as well) during :
  • SchemaMigration
So the database configuration needs to cater for different scenarios:
  1. no schema migration should be done (table is completely managed by a 3rd party)
  2. schema migration only for mapped tables (in general tables are managed by a 3rd party, but a few tables were created by TYPO3)
  3. full schema control (like TYPO3 default, 3rd party tables not mapped should be removed)
While this covers the intended altering of tables, in order to cope with connection issues perhaps additionally
  • the schema migration should have an option to skip unavailable connections (handle the exceptions) and still run for the others
Current state is:
  • If a table mapping exists, then the whole connection is treated by the SchemaMigration
Some incomplete approaches for the current situation are:
  • additional.php: Check if additional condition is up (and perhaps if on CLI), perhaps remove connection.
  • read-only user for db access

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #94638: DB Schema diff fails, when a database table is mapped to a different connectionClosed2021-07-26

Actions
Actions #1

Updated by Stefan Bürk 10 months ago

  • Assignee set to Stefan Bürk
Actions #2

Updated by Helmut Hummel 10 months ago

  • Related to Bug #94638: DB Schema diff fails, when a database table is mapped to a different connection added
Actions

Also available in: Atom PDF