From d94fd0f56cc3d78ac0c278eb6a57d8189a9d918d Mon Sep 17 00:00:00 2001 From: "bobonog@gmail.com" Date: Wed, 5 Jul 2023 11:54:24 +0200 Subject: [PATCH] Removed (for Mysql QueryBuilder) NotSupportedException() when executing addheck() and dropCheck(), resolve #19819 --- framework/db/mysql/QueryBuilder.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/framework/db/mysql/QueryBuilder.php b/framework/db/mysql/QueryBuilder.php index fc10931c7a..2cc1b1c2ae 100644 --- a/framework/db/mysql/QueryBuilder.php +++ b/framework/db/mysql/QueryBuilder.php @@ -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;