mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 03:26:36 +08:00
Removed (for Mysql QueryBuilder) NotSupportedException() when executing addheck() and dropCheck(), resolve #19819
This commit is contained in:
@ -150,24 +150,6 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
return $this->dropIndex($name, $table);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @throws NotSupportedException this is not supported by MySQL.
|
||||
*/
|
||||
public function addCheck($name, $table, $expression)
|
||||
{
|
||||
throw new NotSupportedException(__METHOD__ . ' is not supported by MySQL.');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @throws NotSupportedException this is not supported by MySQL.
|
||||
*/
|
||||
public function dropCheck($name, $table)
|
||||
{
|
||||
throw new NotSupportedException(__METHOD__ . ' is not supported by MySQL.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a SQL statement for resetting the sequence value of a table's primary key.
|
||||
* The sequence will be reset such that the primary key of the next new row inserted
|
||||
@ -266,7 +248,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
$columns = [reset($tableSchema->columns)->name];
|
||||
$defaultValue = 'DEFAULT';
|
||||
}
|
||||
|
||||
|
||||
foreach ($columns as $name) {
|
||||
$names[] = $this->db->quoteColumnName($name);
|
||||
$placeholders[] = $defaultValue;
|
||||
|
||||
Reference in New Issue
Block a user