public function unique(string $indexName): IndexColumnsDefiner
    {
        return new IndexColumnsDefiner(function (array $columnNames) use ($indexName) {
            $this->indexes[] = new Index($this->orm->getNamespace() . $indexName, true, $columnNames);
        });
    }
public function unique(string $indexName): IndexColumnsDefiner
    {
        return new IndexColumnsDefiner(function (array $columnNames) use ($indexName) {
            $this->indexes[] = new Index($this->orm->getNamespace() . $indexName, true, $columnNames);
        });
    }
public function unique ( string $ indexName ) : IndexColumnsDefiner { return new IndexColumnsDefiner ( function ( array $ columnNames ) use ( $ indexName ) { $ this -> indexes [ ] = new Index ( $ this -> orm -> getNamespace ( ) . $ indexName , true , $ columnNames ) ; } ) ; }
Defines a unique index on the supplied columns

@param string $indexName

@return IndexColumnsDefiner
Defines a unique index on the supplied columns