src/Migration.php
public function dropPrimaryKey($name, $table)
    {
        $tip = "drop primary key on {$table}";
        $sql =  'ALTER TABLE ' . $this->db->quoteTableName($table)
            . ' DROP PRIMARY KEY';

        $time = $this->beginCommand($tip);
        $this->db->createCommand()->setSql($sql)->execute();
        $this->endCommand($time);
    }
public function dropPrimaryKey($name, $table)
    {
        $tip = "drop primary key on {$table}";
        $sql =  'ALTER TABLE ' . $this->db->quoteTableName($table)
            . ' DROP PRIMARY KEY';

        $time = $this->beginCommand($tip);
        $this->db->createCommand()->setSql($sql)->execute();
        $this->endCommand($time);
    }
删除主键
@param string $name
@param string $table