Browse Source

Replaced dropConstraint with dropPrimarykey method.

tags/2.0.0-beta
gevik 12 years ago
parent
commit
a977d8208e
  1. 15
      framework/yii/db/QueryBuilder.php

15
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);
}
/**

Loading…
Cancel
Save