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

Emulator stops responding, tables not created
Best way to update Android widget exactly at time?
android 4.4 transparent png background issue
Edit Text view increase its size when inserted long text in android
How to retrieve specific events from a calendar in Android
android Color of the cell on Grid View changes on scrolling
Send push notifications through Rails to Android
Receive/install application updates from code
Opening Native File Browser in android using the cordova
Scaling selector drawable
Gradle/Maven - Error loading aar dependency
sqlite transaction during lengthy operation
Command line failed with error code 8 in phonegap/cordova
IllegalArgumentException when parsing String to Joda DateTime
How to wait for a result from AsyncTask from a main thread?
SwiperefreshLayout in Android

Categories

HOME
django
phantom-dsl
fabricjs
forms
google-spreadsheet
powerpoint
owl-carousel
yandex
google-admin-sdk
nfs
rcloud
qpython
tput
capistrano3
coin3d
wolframalpha
oledb
solrcloud
symbols
undertow
dpdk
r-mice
tosca
interpreter
ckfinder
jasmine-node
mat
constexpr
livelink
paragraph
turfjs
contacts
keras-layer
getpixel
imx6
servicestack-text
python-pptx
flatmap
metawidget
hackintosh
skylink
movilizer
lpsolve
signal-strength
stylecop
xbmc
user-defined-fields
vugen
reindex
gpg-signature
flac
bootstrap-tags-input
pure-css
resourcemanager
nikeplus-api
respondcms
tracker-enabled-dbcontext
aurora
false-sharing
realsense
maybe
lazybones
flock
django-urls
intel-c++
phonertc
visual-sourcesafe-2005
viola-jones
sql-server-data-tools
skspritenode
botan
snoop
fits
procedural-programming
document-repository
ghcjs
addressing-mode
entry-point
tweenlite
build-script
cuba
hibernate-entitymanager
kendo-dataviz
ice-cube
kogrid
resource-management
mkv
hibernateexception
entity-attribute-value
entitydatasource
strsep
appledoc
twitterizer
duplex
todos
fault-tolerance
entitykey
lemmatization

Resources

Encrypt Message