Setup/Install/DataMigrationHelper.php
private function emptyTables()
    {
        foreach ($this->dataMigrationTypeProvider->getTypes() as $migrationType) {
            /** @var AbstractDataMigration $migrationType */
            $tableName = $this->resourceConnection->getTableName($migrationType->getTableName());
            $this->resourceConnection->getConnection()->delete($tableName);

            $this->resourceConnection->getConnection()
                ->query(sprintf('ALTER TABLE %s AUTO_INCREMENT = 1', $tableName));
        }
    }
private function emptyTables()
    {
        foreach ($this->dataMigrationTypeProvider->getTypes() as $migrationType) {
            /** @var AbstractDataMigration $migrationType */
            $tableName = $this->resourceConnection->getTableName($migrationType->getTableName());
            $this->resourceConnection->getConnection()->delete($tableName);

            $this->resourceConnection->getConnection()
                ->query(sprintf('ALTER TABLE %s AUTO_INCREMENT = 1', $tableName));
        }
    }
private function emptyTables ( ) { foreach ( $ this -> dataMigrationTypeProvider -> getTypes ( ) as $ migrationType ) { /** @var AbstractDataMigration $migrationType */ $ tableName = $ this -> resourceConnection -> getTableName ( $ migrationType -> getTableName ( ) ) ; $ this -> resourceConnection -> getConnection ( ) -> delete ( $ tableName ) ; $ this -> resourceConnection -> getConnection ( ) -> query ( sprintf ( 'ALTER TABLE %s AUTO_INCREMENT = 1' , $ tableName ) ) ; } }
Truncate relevant tables before running
Truncate relevant tables before running