do not forget DB table prefix with truncate query

- as used in LDAP's AbstractMapping::clear() method
- and in Comment's ManagerTest::setUp()
- fixes a DB Exception with Oracle

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2022-03-18 16:59:46 +01:00
parent 39b5c2cd83
commit 4656753df0
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -67,7 +67,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
// ldap_group_mapping_backup table. No need to recreate, but it
// should be empty.
// TRUNCATE is not available from Query Builder, but faster than DELETE FROM.
$sql = $this->dbc->getDatabasePlatform()->getTruncateTableSQL('ldap_group_mapping_backup', false);
$sql = $this->dbc->getDatabasePlatform()->getTruncateTableSQL('`*PREFIX*ldap_group_mapping_backup`', false);
$this->dbc->executeStatement($sql);
}
}