Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save khorshuheng/ff3ad6287e92a51e56ecd080fcc0a533 to your computer and use it in GitHub Desktop.
Save khorshuheng/ff3ad6287e92a51e56ecd080fcc0a533 to your computer and use it in GitHub Desktop.
UPDATE kv_table
SET value = (
SELECT json_object(
'user_id', json_extract(b.value, '$.user_id'),
'user_uuid', json_extract(b.value, '$.user_uuid'),
'workspace_id', json_extract(b.value, '$.user_workspace.id')
)
FROM kv_table AS b
WHERE b.key = 'session_cache_key_backup'
)
WHERE key IN ('appflowy_session_cache', 'anon_user');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment