Reset autoincrement in a custom purger not in DataFixtures.

This makes things a lot prettier in the DataFixtures.
This commit is contained in:
Jan Böhmer 2021-10-02 20:14:48 +02:00
parent bd4c20765a
commit 63065a8b58
8 changed files with 326 additions and 10 deletions

View file

@ -93,9 +93,6 @@ class DataStructureFixtures extends Fixture
throw new InvalidArgumentException('$class must be a StructuralDBElement!');
}
$table_name = $this->em->getClassMetadata($class)->getTableName();
$this->em->getConnection()->exec("ALTER TABLE `${table_name}` AUTO_INCREMENT = 1;");
/** @var AbstractStructuralDBElement $node1 */
$node1 = new $class();
$node1->setName('Node 1');