Doctrine\DBAL\Platforms\MySqlPlatform::getDropIndexSQL PHP Method

getDropIndexSQL() public method

{@inheritDoc}
public getDropIndexSQL ( $index, $table = null )
    public function getDropIndexSQL($index, $table = null)
    {
        if ($index instanceof Index) {
            $indexName = $index->getQuotedName($this);
        } elseif (is_string($index)) {
            $indexName = $index;
        } else {
            throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $index parameter to be string or \\Doctrine\\DBAL\\Schema\\Index.');
        }
        if ($table instanceof Table) {
            $table = $table->getQuotedName($this);
        } elseif (!is_string($table)) {
            throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $table parameter to be string or \\Doctrine\\DBAL\\Schema\\Table.');
        }
        if ($index instanceof Index && $index->isPrimary()) {
            // mysql primary keys are always named "PRIMARY",
            // so we cannot use them in statements because of them being keyword.
            return $this->getDropPrimaryKeySQL($table);
        }
        return 'DROP INDEX ' . $indexName . ' ON ' . $table;
    }
MySqlPlatform