android


How to upgrade my realm db in android [duplicate]


This question already has an answer here:
Upgrade realm in an Android project
1 answer
In my android project, we are using Realm db version 0.87.4. Currently Realm in version 2.3.1 for android.
Our android application already released in Playstore and many user using it. How to upgrade my realm db version without losing any data and functionalities.
I thought some Realm methods may be deprecated or removed from latest Realm Db
Currently Realm db is in version 3.1.4 for Android. In order to migrate your database to the latest version,you have to change the RealmConfiguration code as follows
RealmConfiguration config = new RealmConfiguration.Builder()
.schemaVersion(1)
.migration(new MyMigration()) // Migration to run instead of throwing an exception
.build()
Assuming your schema is not changing, you also have to create the MyMigration class as follows,
public class MyMigration implements RealmMigration {
#Override
public void migrate(DynamicRealm realm, long oldVersion, long newVersion) {
}
}
You may refer to Realm Docs for more info

Related Links

play-services-location:9.0.0 generate a java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
Android: drawTextOnPath multiline
FloatingActionButton, layout_anchor and layout_gravity
Admob add at bottom
Dex file exceeded 64k after adding Google Play Services 9.0.0
how to update listview in Popup window in Android
android How to show 25 row in multi column list view and when click on next button show next 25 row
displaying retrived data from SQL as table in android
Using org.appache.http.client in android studio
Android wear reflection heap issue
How to Bypass Deleting SQLite Data Using Snackbar Undo Action
android studio generate signed apk
Android - Navigation Up With Fragment
Finding application name of other applications in the phone from their package name
No view found for id when trying to start a new fragment
How add accounts settings

Categories

HOME
turing-machines
rdbms
pda
mjml
3d
apache-spark-mllib
yahoo-finance
battery
cakephp-3.4
gembox-spreadsheet
nested-if
regular-language
spring-session
data-visualization
missing-data
pkcs#11
character
vimdiff
xcodebuild
frequency-distribution
renjin
eip
mvc-mini-profiler
replication
interpreter
xunit
slidetoggle
oculus
firebase-analytics
winexe
openmdao
alm
event-flow
kudu
sim-toolkit
spring-mvc-test
c9.io
doc
plaintext
linqpad
signal-strength
rfc3339
puredata
sonarlint-eclipse
fclose
identification
trojan
boxing
rxtx
usart
pytables
reporting-services-2012
winusb
drawstring
cda
thread-sleep
exim4
mobiledoc-kit
inf
include-guards
dock
atoi
typemock
jquery-forms-plugin
cryptographichashfunction
cross-join
jbake
pseudo-class
structuremap3
template-deduction
ss7
wxformbuilder
memset
extjs2
gae-quotas
multiautocompletetextview
accesscontrolexception
inputmismatchexception
jquery-1.9
redis-py
panda3d
dajaxice
jdb
isa-swizzling
apache-commons-dbutils
agility.js
socketserver
uideviceorientation
instantiationexception
movieplayer

Resources

Encrypt Message