diff --git a/framework/yii/db/QueryBuilder.php b/framework/yii/db/QueryBuilder.php index f65ee25..e8f4aa3 100644 --- a/framework/yii/db/QueryBuilder.php +++ b/framework/yii/db/QueryBuilder.php @@ -288,15 +288,16 @@ class QueryBuilder extends \yii\base\Object } /** - * Builds a SQL statement for removing a constraint to an existing table. - * @param string $name the name of the constraint to be removed. - * @param string $table the table that constraint will be removed from. - * @return string the SQL statement for removing constraint from an existing table. + * Builds a SQL statement for removing a primary key constraint to an existing table. + * @param string $name the name of the primary key constraint to be removed. + * @param string $table 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 dropConstraint($name,$table) + public function dropPrimarykey($name,$table) { - return 'ALTER TABLE ' . $this->quoteTableName($table) . ' DROP CONSTRAINT ' - . $this->quoteColumnName($name); + return 'ALTER TABLE ' . $this->db->quoteTableName($table) + . ' DROP CONSTRAINT ' . $this->db->quoteColumnName($name); + } /**