From f64d461bff23c9cc097724b54a8f31256f878bb1 Mon Sep 17 00:00:00 2001 From: erikn69 Date: Wed, 29 Jun 2022 18:08:44 -0500 Subject: [PATCH] Upgrade example using JSON_EXTRACT (#2970) --- UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index 119fd09cf..51559728b 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -41,7 +41,7 @@ class AddGeneratedConversionsToMediaTable extends Migration { }) ->whereRaw("JSON_LENGTH(custom_properties) > 0") ->update([ - 'generated_conversions' => DB::raw('custom_properties->"$.generated_conversions"'), + 'generated_conversions' => DB::raw("JSON_EXTRACT(custom_properties, '$.generated_conversions')"), // OPTIONAL: Remove the generated conversions from the custom_properties field as well: // 'custom_properties' => DB::raw("JSON_REMOVE(custom_properties, '$.generated_conversions')") ]);