From a2df4223abaf0fcdd240bf556f8f4f711caf7c9c Mon Sep 17 00:00:00 2001 From: Tyrone Tudehope Date: Mon, 23 Oct 2023 08:12:27 +0200 Subject: [PATCH] Don't validate on field resave during migration --- ...230907_112944_migrate_field_to_multicolumn_content.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/migrations/m230907_112944_migrate_field_to_multicolumn_content.php b/src/migrations/m230907_112944_migrate_field_to_multicolumn_content.php index 39d1faa..b2b28dc 100644 --- a/src/migrations/m230907_112944_migrate_field_to_multicolumn_content.php +++ b/src/migrations/m230907_112944_migrate_field_to_multicolumn_content.php @@ -36,8 +36,12 @@ public function resaveFields() continue; } - if (! $fieldsService->saveField($field)) { - throw new \RuntimeException(Json::encode($field->getErrors())); + if (! $fieldsService->saveField($field, false)) { + throw new \RuntimeException(Json::encode([ + 'field' => $field->handle, + 'type' => $field::class, + 'errors' => $field->getErrors(), + ])); } } }