yii\db\mysql\QueryBuilder::dropPrimaryKey PHP Method

dropPrimaryKey() public method

Builds a SQL statement for removing a primary key constraint to an existing table.
public dropPrimaryKey ( string $name, string $table ) : string
$name string the name of the primary key constraint to be removed.
$table string the table that the primary key constraint will be removed from.
return string the SQL statement for removing a primary key constraint from an existing table.
    public function dropPrimaryKey($name, $table)
    {
        return 'ALTER TABLE ' . $this->db->quoteTableName($table) . ' DROP PRIMARY KEY';
    }