Migrating to new directory


#1

I setup my realm configuration in the Cache directory and would like to migrate it to the data directory. Any ideas how to do that? If I remove the “.directory” line it will point to the data directory but my realm data is lost.

RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
.name(BuildConfig.APPLICATION_ID + “.realm”)
.schemaVersion(5)
.directory(this.getCacheDir())
.migration(new POSMigration())
.build();