Skip to content

Commit

Permalink
Merge pull request #245 from ctangney-tulip/issue-228
Browse files Browse the repository at this point in the history
Escape SQL query in Migration
  • Loading branch information
sebastian-lenz authored Nov 29, 2022
2 parents 4b86a33 + ef696f6 commit 0acd4d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/migrations/m190417_202153_migrateDataToTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ private function updateAllFields(): void {
*/
private function updateAllSettings(): void {
$this->update(Table::FIELDS, [
'type' => 'lenz\linkfield\fields\LinkField',
'type' => 'lenz\\linkfield\\fields\\LinkField',
], [
'type' => 'typedlinkfield\fields\LinkField'
'type' => 'typedlinkfield\\fields\\LinkField'
]);

$rows = (new Query())
->select(['id', 'settings'])
->from(Table::FIELDS)
->where(['type' => 'lenz\linkfield\fields\LinkField'])
->where(['type' => 'lenz\\linkfield\\fields\\LinkField'])
->all();

foreach ($rows as $row) {
Expand Down

0 comments on commit 0acd4d0

Please sign in to comment.