Remove a table from a previous Realm scheme
See original GitHub issueHi, With the introduction of Modules (Realm 0.82.0), I have splitted a part of my scheme into another Realm. However, the old database (which is now a core Module) still contains tables that are no longer needed (and data as well).
Example:
Old scheme contained A, B, C into main.realm
.
New scheme is now splitted in two Modules
A, B into main.realm
C into second.realm
Following the app update, main.realm
still contains a table C and I’m unable to clean nor delete the table manually (error like ‘this entity is not part of this module’).
Is there a way I did not find? Thanks.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Drop a table in a RealmSwift migration - Stack Overflow
To completely delete a table (called CLASS in realm terms) one needs to do the following: config.migrationBlock = { migration ...
Read more >How to Delete Data in Realm Database in Android?
Navigate to the app > res > layout > activity_update_course.xml file and add a Button inside this layout for deleting a course. Below...
Read more >4 Configuring Realms - Oracle Help Center
To delete a realm: In the Oracle Database Vault Administration page, select Realms.
Read more >db.collection.drop() — MongoDB Manual
Use db.collection.remove() to remove the existing documents and reuse the collection. Use this approach to avoid flushing the cache.
Read more >Migration with Realm (RealmSwift Part 6) | by Ali Akhtar
Solution 1 (Delete old file). Delete the application and run again with the code shown in Figure 3 and you will see we...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kkmike999 You can use
realm.getSchema().remove(className)
. https://realm.io/docs/java/latest/api/io/realm/RealmSchema.html#remove-java.lang.String-You really need
removeClass()
in our upcoming migration API. I can’t give you a release date but we are working on it.