From a977d8208e9eed508bf0bb9005096392879641d4 Mon Sep 17 00:00:00 2001 From: gevik Date: Sun, 9 Jun 2013 14:10:45 +0200 Subject: [PATCH] Replaced dropConstraint with dropPrimarykey method. --- framework/yii/db/QueryBuilder.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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); + } /**