Fixed issue, that users table were delete while PartKeepr import on certain databases

This fixes issue #299
This commit is contained in:
Jan Böhmer 2023-06-11 00:31:05 +02:00
parent 44cb0fa434
commit ab11747fab
2 changed files with 7 additions and 2 deletions

View file

@ -43,8 +43,8 @@ class PKImportHelper
*/
public function purgeDatabaseForImport(): void
{
//Versions with "" are needed !!
$purger = new ResetAutoIncrementORMPurger($this->em, ['users', '"users"', 'groups', '"groups"', 'u2f_keys', 'internal', 'migration_versions']);
//We use the ResetAutoIncrementORMPurger to reset the auto increment values of the tables. Also it normalizes table names before checking for exclusion.
$purger = new ResetAutoIncrementORMPurger($this->em, ['users', 'groups', 'u2f_keys', 'internal', 'migration_versions']);
$purger->purge();
}