Is it possible to alter a property in studio so it becomes a PK and will be indexed?
Otherwise is it possible to do that when creating a realm from CSV data?
If both is not possible, how can I achieve that with JavaScript? Could not find any documentation about this topic, at least not for JS.
How can I add a primary key and index to an object in studio
386sx
#1
386sx
#3
Thanks, I figured that but my question was not specific enough. The question was if this is possible with an existing realm with objects.
I created a new one from the JS client, but it would be still interesting if it’s possible to alter a schema (add indexes) in studio or with JS.
ianward
#4
@386sx No - you cannot change the primary key, this would be a destructive change
https://docs.realm.io/platform/using-synced-realms/migrating-your-data#destructive-changes