public function getIndex($name)
    {
        if (!$this->hasIndex($name)) {
            throw SchemaException::tableIndexDoesNotExist($this->getName(), $name);
        }

        return $this->indexes[$name];
    }