Bug #84213
openWorking with alternative database, extension manager and BD comparison wrong analyse
0%
Description
Install extension
Working with alternative database, extension manager and BD comparison wrong analyse
When working with an alternate database, LocalConfiguration.php :
'DB' => [
'Connections' => [
'Default' => [
'charset' => 'utf8',
'dbname' => 'db-typo3',
'driver' => 'mysqli',
'host' => 'localhost',
'password' => '123456',
'port' => 3306,
'user' => 'user-t3',
],
'alternativeDb' => [
'charset' => 'utf8',
'dbname' => 'db-alternative',
'driver' => 'mysqli',
'host' => 'localhost',
'password' => '123456',
'port' => 3306,
'user' => 'user-alt',
],
],
'TableMapping' => [
'My_Table1' => 'alternativeDb',
'My_Table2' => 'alternativeDb',
]
]
and trying to install an extension or compare database with Install Tool result in an error saying that the table from alternative database already exists.
#20: The table with name 'alt-db.My_Table1' already exists. (More information)
Note : same result if 'My_Table1' is not in 'TableMapping'.
The tables from alternative database are created with an external application and they are unknown from Typo3.
Files
Updated by Florian Rival about 6 years ago
- Project changed from 9 to TYPO3 Core
- Category set to Database API (Doctrine DBAL)
- TYPO3 Version set to 8
- PHP Version set to 7.0
Updated by Susanne Moog about 4 years ago
- Status changed from New to Needs Feedback
Just tested on a clean installation in v10 with
'DB' => [ 'Connections' => [ 'Default' => [ 'charset' => 'utf8', 'driver' => 'pdo_mysql', ], ], 'alternativeDb' => [ 'charset' => 'utf8', 'dbname' => 'other', 'driver' => 'mysqli', 'host' => 'db', 'password' => 'root', 'port' => 3306, 'user' => 'root', ], 'TableMapping' => [ 'My_Table1' => 'alternativeDb', 'My_Table2' => 'alternativeDb', ], ],
Database Analyzer and extension installation work fine without errors. Can you recheck if you have set any more configuration options or if this bug also happens in newer TYPO3 versions?
Updated by Stephan Großberndt almost 4 years ago
Does your ext_tables.sql also contain the alternative db part making it alt-db.My_Table1
instead of My_Table1
?
Updated by Florian Rival almost 4 years ago
Susanne, Stephan, no I have nothing relative to alternative DB tables in ext_tables.sql, however, in ext_typoscript_setup.txt there is the following code for table mapping :
plugin.tx_myplugin { persistence { classes { Oktopuce\MyPlugin\Domain\Model\MyTable1 { mapping { tableName = My_Table1 recordType = \Oktopuce\MyPlugin\Domain\Model\MyTable1 columns { Col1.mapOnProperty = uid Col2.mapOnProperty = mySecondColumn } } } } } }