Skip to content

Commit

Permalink
Update 2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql (#4982)
Browse files Browse the repository at this point in the history
Fix MariaDB compatibility with JSON_EXTRACT

Co-authored-by: Matt Bishop <[email protected]>
(cherry picked from commit 639ee57)
  • Loading branch information
holow29 authored and ike-kottlowski committed Nov 6, 2024
1 parent a2654ce commit 360b526
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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":{}}')
Expand All @@ -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":{}}')
Expand Down

0 comments on commit 360b526

Please sign in to comment.