src/Service/DB/Table.php
public function hasIndex($index_name)
    {
        foreach ($this->getIndexes() as $index) {
            if ($index['name'] === $index_name) {
                return true;
            }
        }

        return false;
    }
public function hasIndex($index_name)
    {
        foreach ($this->getIndexes() as $index) {
            if ($index['name'] === $index_name) {
                return true;
            }
        }

        return false;
    }
检查索引是否存在.

@param string $index_name

@return bool