Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration & MySql Query addCheck() and dropCheck() #19881

Merged
merged 18 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed (for Mysql QueryBuilder) NotSupportedException() when executi…
…ng addheck() and dropCheck(), resolve #19819
bobonog@gmail.com committed Jul 5, 2023
commit d94fd0f56cc3d78ac0c278eb6a57d8189a9d918d
20 changes: 1 addition & 19 deletions framework/db/mysql/QueryBuilder.php
Original file line number Diff line number Diff line change
@@ -150,24 +150,6 @@ public function dropUnique($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.
* The sequence will be reset such that the primary key of the next new row inserted
@@ -266,7 +248,7 @@ protected function prepareInsertValues($table, $columns, $params = [])
$columns = [reset($tableSchema->columns)->name];
$defaultValue = 'DEFAULT';
}

foreach ($columns as $name) {
$names[] = $this->db->quoteColumnName($name);
$placeholders[] = $defaultValue;