src/CsvMigration.php
private function removeIndexes(DbField $dbField, bool $exists = true) : void
    {
        if (! $exists) {
            return;
        }

        // remove legacy index
        $this->table->removeIndexByName($dbField->getName());

        // remove unique index
        if (!$dbField->getUnique() && $this->table->hasIndex($dbField->getName())) {
            $indexName = 'unique_' . $dbField->getName();
            $this->table->removeIndexByName($indexName);
        }

        // remove lookup index
        if ('uuid' !== $dbField->getType() && $this->table->hasIndex($dbField->getName())) {
            $indexName = 'lookup_' . $dbField->getName();
            $this->table->removeIndexByName($indexName);
        }
    }
private function removeIndexes(DbField $dbField, bool $exists = true) : void
    {
        if (! $exists) {
            return;
        }

        // remove legacy index
        $this->table->removeIndexByName($dbField->getName());

        // remove unique index
        if (!$dbField->getUnique() && $this->table->hasIndex($dbField->getName())) {
            $indexName = 'unique_' . $dbField->getName();
            $this->table->removeIndexByName($indexName);
        }

        // remove lookup index
        if ('uuid' !== $dbField->getType() && $this->table->hasIndex($dbField->getName())) {
            $indexName = 'lookup_' . $dbField->getName();
            $this->table->removeIndexByName($indexName);
        }
    }
private function removeIndexes ( DbField $ dbField , bool $ exists = true ) : void { if ( ! $ exists ) { return ; } // remove legacy index $ this -> table -> removeIndexByName ( $ dbField -> getName ( ) ) ; // remove unique index if ( ! $ dbField -> getUnique ( ) && $ this -> table -> hasIndex ( $ dbField -> getName ( ) ) ) { $ indexName = 'unique_' . $ dbField -> getName ( ) ; $ this -> table -> removeIndexByName ( $ indexName ) ; } // remove lookup index if ( 'uuid' !== $ dbField -> getType ( ) && $ this -> table -> hasIndex ( $ dbField -> getName ( ) ) ) { $ indexName = 'lookup_' . $ dbField -> getName ( ) ; $ this -> table -> removeIndexByName ( $ indexName ) ; } }
Remove column indexes.

@param \CsvMigrations\FieldHandlers\DbField $dbField DbField object
@param bool $exists Table exists flag
@return void
Remove column indexes .