Removed (for Mysql QueryBuilder) NotSupportedException() when executing addheck() and dropCheck(), resolve #19819

This commit is contained in:
bobonog@gmail.com
2023-07-05 11:54:24 +02:00
parent 3615134d3d
commit d94fd0f56c

View File

@ -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;