Browse Source

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>
Arthur Schiwon 2 years ago
parent
commit
33ac5fc640
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/user_ldap/lib/Migration/Version1130Date20211102154716.php

+ 1 - 1
apps/user_ldap/lib/Migration/Version1130Date20211102154716.php

@@ -69,7 +69,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->executeUpdate($sql);
 		}
 	}