Questions tagged [realm-migration]

Realm is a databasing system for iOS and Android mobile applications. Then a change is made in the database model it must be "Migrated" to the 'realm' for it to be incorporated into the database scheme.

Realm is a databasing system for iOS and Android mobile applications. When a change is made in the database model it must be "Migrated" to the 'realm' for it to be incorporated into the database scheme.

For information:
https://realm.io/docs/swift/latest/#migrations
https://realm.io/docs/swift/latest/api/

207 questions
0
votes
1 answer

How to migrate old properties into a new object with Realm Swift

Previously, I had only one object that had every value that I needed. I "regrouped" them and made separate objects. I added properties with the type of the new objects to the original object. How can I assign the old property values to the object's…
Dan
  • 303
  • 3
  • 15
0
votes
2 answers

Realm Migration: Move an Object from one Object to another Object

I have three objects: class Customer: Object { dynamic var solution: Solution!; ... } class Solution: Object { dynamic var data: Data!; ... } class Data: Object { ... } Now i need to move the Data Object from Solution to…
Mulgard
  • 9,877
  • 34
  • 129
  • 232
0
votes
0 answers

Changing modules for an already configured realm

I had a question regarding adding modules to a realm configuration to restrict a Realm to only contain a subset of classes. I understand that it can be done by defining a custom RealmModule and then specifying that module in the realm…
rbing
  • 133
  • 1
  • 10
0
votes
1 answer

Realm migration, where to initialise

I'm trying to work with one of the documented methods of migrating a realm database and setting the schema version. The kind of code I am using is: let config = Realm.Configuration( // Set the new schema version. This must be greater than the…
Michael Moulsdale
  • 1,488
  • 13
  • 34
0
votes
1 answer

Realm no configuration change after removing PrimaryKey

Using Realm I'm running into some migration issues, even though I shouldn't have any. All migration is disabled: RealmConfiguration config = new RealmConfiguration.Builder(dir) .deleteRealmIfMigrationNeeded() .build(); However, I removed a…
jdepypere
  • 3,453
  • 6
  • 54
  • 84
0
votes
0 answers

java.lang.IllegalStateException: Requested table is not in this Realm

I deleted one entry from UserDatabse in realm in Activity "A" and when I tested after deletion the size of UserDatabase it returns "1" , Then I started Activity B and then When the following Line executes : Realm realm =…
erluxman
  • 18,155
  • 20
  • 92
  • 126
0
votes
1 answer

Bundling Realm with App and Migration

I am following the Realm documentation on migration and on bundling a realm with an app. I am using the following code to copy the bundled Realm to be the default Realm. which works well. let initialURL =…
Michael Moulsdale
  • 1,488
  • 13
  • 34
0
votes
1 answer

Realm migration memory leak iOS

I am getting memory leak during migration using Realm (v1.0.2). My code looks like that: let config = Realm.Configuration( schemaVersion: 1, migrationBlock: { migration, oldSchemaVersion in // We haven’t migrated…
Roman Barzyczak
  • 3,785
  • 1
  • 30
  • 44
0
votes
1 answer

Realm column names vs Swift variable names

I'm trying to create a Realm database that has columns that contain special characters and are all numbers such as '2010' or 'Share%'. I can create the Realm using Realm Browser and even create a Realm object using http://www.realmgenerator.eu/ but…
micyukcha
  • 347
  • 1
  • 2
  • 10
0
votes
2 answers

How to override LinkingObjects in Realm 1.0

I want to migrate to from Realm 0.98 to 1.0.2 but I struggle with LinkingObjects used in inheritance. I can not override the linkingObjects property as before. Simplified my model exists of a Person that has pets and cats. Cat is a subclass of Pet…
martn_st
  • 2,576
  • 1
  • 24
  • 30
0
votes
1 answer

Realm: Is Migration Needed?

Is there a way to ask Realm in Android if migration is needed? I have my configuration in place so that realm gets deleted if migration is needed. realmConfiguration = new RealmConfiguration .Builder(context) …
Terry
  • 14,529
  • 13
  • 63
  • 88
0
votes
1 answer

realm encription, Realm file decryption failed,what‘s wrong?

My code is here: RLMRealmConfiguration *configuration = [RLMRealmConfiguration defaultConfiguration]; NSString *filePath = [NSString stringWithFormat:@"%@",configuration.fileURL]; NSString *dateBaseName = @"aaa"; configuration.fileURL = [NSURL…
Line
  • 1
0
votes
1 answer

Realm: Getting -[__NSArrayM UTF8String]: unrecognized selector sent to instance

I am Getting crash in app upgrade scenario. It gives below error and warning. But this issue happens only when I have AppStore build installed and on top of that I install my new testflight build. If I install developer build on AppStore build,…
JiteshW
  • 2,195
  • 4
  • 32
  • 61
0
votes
1 answer

NullPointerException void io.realm.RealmChangeListener.onChange()

I'm trying to implement Realm database in my project, I have a class with methods to add items in the database, I use that class to store those methods and call them in my fragment, but when I do that I get an error: java.lang.NullPointerException:…
AND4011002849
  • 1,971
  • 8
  • 38
  • 81
0
votes
0 answers

How can I figure out if Realm exists

I want to change the Realmconfiguration for an allready existing realm database. In my app I'm using until now: new RealmConfiguration.Builder(this).name("db10").build(); After publishing the app on Playstore I found out that I could use a custom…
1 2 3
13
14