Legacy GRDB Tables (UUID.ByteRepresentation) with CloudKit #383
Replies: 1 comment 1 reply
-
|
Hi @lhr0909, I'm curious how you got far enough to get that error. I would have thought you would get a compiler error much earlier because our CloudKit tools require that your tables have string ID column. I think the best path forward is to migrate your tables to use string UUIDs. There are no benefits to storing the IDs as blobs, and it's just going to run into more problems down the line (such as the fact that currently SQLiteData deals with all blobs as We already have a tool that can migrate tables using auto incrementing primary keys to UUIDs. Perhaps it could be beefed up to also migrate blob UUIDs to lower case strings (the default of StructuredQueries): If you were to explore that we would happily take a PR. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting an error message when I try to conform my legacy GRDB table (has byte representation UUIDs as id) with CloudKit sync, and I got the following error message:
cannot store BLOB value in TEXT column sqlitedata_icloud_metadata.recordPrimaryKey.Is this something we can add to avoid having a big migration? I am adding it for my smaller app which only has one legacy table (newer tables are using SQLiteData directly), and I had to do a migration and swap out all UUIDs when I do insertion. I have a bigger app which has more UUID tables and I am afraid that I cannot manage all of the foreign keys properly when I migrate. Would be good to see if there is a way to directly use CloudKit syncing with these legacy GRDB tables. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions