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

How to save the high score in game in Android?
About NFC/Rfid: some trouble
meteor run android-device stopped working
Error:(8, 30) String types not allowed (at 'description' with value 'Public Albums of this username will be fetched')
Programatically creating a it.gmariotti.cardslib.library.view.CardViewNative
why would a fragment class may not be valid?
How to use animated weather icons
java.lang.NoClassDefFoundError: com.facebook.imagepipeline.producers.HttpUrlConnectionNetworkFetcher
AndroidGuiExample failed compiling
Android Retrofit okhttp error
Facebook Unity SDK Blank Perm Window
How to set a EditText that popup a calender to select date and display in EditText in Tab Activity
Android: How to set Orientation for View
how to fetch chat list in order with newest chat first using sqlite and android
Game Maker: Studio Android Not Compiling
Android Annotations and new Android Databinding

Categories

HOME
api
jax-rs
twig
mjml
oracle-apex-5
apiblueprint
edge
static-site
hugo
interpolation
nuget-package
code-coverage
webix
fosrestbundle
reactive-programming
gkturnbasedmatch
onedrive-api
symbol
standards
shortest-path
connector
exit
qliksense
jboss6.x
onload
inversion-of-control
tpm
autolisp
hard-drive
indy10
fiware-cygnus
protege4
python-pptx
jpad
bc
comparison-operators
xv6
fwrite
openal
corruption
arules
mathcad
vibrate
envi
lrs
wso2developerstudio
ellucian-scribe
toast
design-principles
mobiledoc-kit
jbase
atan2
fiware-monitoring
ons-api
visual-sourcesafe-2005
iced-coffeescript
avahi
ms-access-2000
public-html
beatsmusic
big-ip
sql-scripts
paw
with-statement
mintty
jjaql
jquery-slider
memset
qscrollarea
printdialog
flex++
route-provider
time.h
dolby-audio-api
pagedown
argouml
web-farm
dajaxice
rmiregistry
jquery-address
convention
flex-mobile
gobject-introspection
winmain
lr
folding
murmurhash
sun
dojo-dnd
todos
localizable.strings
movieplayer
image-capture

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App