public function dropPrimaryKey()
    {
        if (!$this->hasPrimaryKey()) {
            throw SchemaException::tablePrimaryKeyDoesNotExist($this->getName());
        }

        foreach ($this->getIndexes() as $index) {
            if ($index->hasSameColumnNames($this->getPrimaryKey()->getColumnNames())) {
                $this->dropIndex($index->getName());
            }
        }

        $this->primaryKey = null;
    }
public function dropPrimaryKey()
    {
        if (!$this->hasPrimaryKey()) {
            throw SchemaException::tablePrimaryKeyDoesNotExist($this->getName());
        }

        foreach ($this->getIndexes() as $index) {
            if ($index->hasSameColumnNames($this->getPrimaryKey()->getColumnNames())) {
                $this->dropIndex($index->getName());
            }
        }

        $this->primaryKey = null;
    }
public function dropPrimaryKey ( ) { if ( ! $ this -> hasPrimaryKey ( ) ) { throw SchemaException :: tablePrimaryKeyDoesNotExist ( $ this -> getName ( ) ) ; } foreach ( $ this -> getIndexes ( ) as $ index ) { if ( $ index -> hasSameColumnNames ( $ this -> getPrimaryKey ( ) -> getColumnNames ( ) ) ) { $ this -> dropIndex ( $ index -> getName ( ) ) ; } } $ this -> primaryKey = null ; }
Drops the table primary key.

@throws \Fridge\DBAL\Exception\SchemaException If there is no primary key.
Drops the table primary key .