From dba182d6a8110279a2103645269cbae61708cb5b Mon Sep 17 00:00:00 2001 From: holow29 <67209066+holow29@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:45:09 -0500 Subject: [PATCH] Update 2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql (#4982) Fix MariaDB compatibility with JSON_EXTRACT Co-authored-by: Matt Bishop --- ...24-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/MySqlMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql b/util/MySqlMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql index 21c1ed741..f47661504 100644 --- a/util/MySqlMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql +++ b/util/MySqlMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql @@ -5,9 +5,9 @@ SET U.TwoFactorProviders = JSON_SET( JSON_SET( U.TwoFactorProviders, '$."2".MetaData.ClientSecret', - JSON_UNQUOTE(U.TwoFactorProviders ->'$."2".MetaData.SKey')), + JSON_UNQUOTE(JSON_EXTRACT(U.TwoFactorProviders,'$."2".MetaData.SKey'))), '$."2".MetaData.ClientId', - JSON_UNQUOTE(U.TwoFactorProviders -> '$."2".MetaData.IKey')) + JSON_UNQUOTE(JSON_EXTRACT(U.TwoFactorProviders,'$."2".MetaData.IKey'))) WHERE JSON_CONTAINS(TwoFactorProviders, '{"2":{}}') @@ -20,9 +20,9 @@ SET o.TwoFactorProviders = JSON_SET( JSON_SET( o.TwoFactorProviders, '$."6".MetaData.ClientSecret', - JSON_UNQUOTE(o.TwoFactorProviders ->'$."6".MetaData.SKey')), + JSON_UNQUOTE(JSON_EXTRACT(o.TwoFactorProviders,'$."6".MetaData.SKey'))), '$."6".MetaData.ClientId', - JSON_UNQUOTE(o.TwoFactorProviders -> '$."6".MetaData.IKey')) + JSON_UNQUOTE(JSON_EXTRACT(o.TwoFactorProviders,'$."6".MetaData.IKey'))) WHERE JSON_CONTAINS(o.TwoFactorProviders, '{"6":{}}')