src/CsvMigration.php
private function addIndexes(DbField $dbField, bool $exists = true) : void
    {
        if ('id' === $dbField->getName()) {
            return;
        }

        $this->removeIndexes($dbField, $exists);

        $added = false;
        if ($dbField->getUnique()) {
            $added = $this->addIndex($dbField, 'unique', $exists);
        }

        if (!$added && 'uuid' === $dbField->getType()) {
            $this->addIndex($dbField, 'lookup', $exists);
        }
    }
private function addIndexes(DbField $dbField, bool $exists = true) : void
    {
        if ('id' === $dbField->getName()) {
            return;
        }

        $this->removeIndexes($dbField, $exists);

        $added = false;
        if ($dbField->getUnique()) {
            $added = $this->addIndex($dbField, 'unique', $exists);
        }

        if (!$added && 'uuid' === $dbField->getType()) {
            $this->addIndex($dbField, 'lookup', $exists);
        }
    }
private function addIndexes ( DbField $ dbField , bool $ exists = true ) : void { if ( 'id' === $ dbField -> getName ( ) ) { return ; } $ this -> removeIndexes ( $ dbField , $ exists ) ; $ added = false ; if ( $ dbField -> getUnique ( ) ) { $ added = $ this -> addIndex ( $ dbField , 'unique' , $ exists ) ; } if ( ! $ added && 'uuid' === $ dbField -> getType ( ) ) { $ this -> addIndex ( $ dbField , 'lookup' , $ exists ) ; } }
Adds indexes to specified dbField.

@param \CsvMigrations\FieldHandlers\DbField $dbField DbField object
@param bool $exists Table exists flag
@return void
Adds indexes to specified dbField .