mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +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);
|
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.
|
* 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
|
* 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];
|
$columns = [reset($tableSchema->columns)->name];
|
||||||
$defaultValue = 'DEFAULT';
|
$defaultValue = 'DEFAULT';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($columns as $name) {
|
foreach ($columns as $name) {
|
||||||
$names[] = $this->db->quoteColumnName($name);
|
$names[] = $this->db->quoteColumnName($name);
|
||||||
$placeholders[] = $defaultValue;
|
$placeholders[] = $defaultValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user