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

Universal Application with Dimensions files android
MoPub SDK : how to remove the video ads ?
Convert Pdf page into image using mupdf
Android ViewPager crash: InflateException: Binary XML file line #7: Error inflating class
APK file creation in Android Studio
YoutubePlayerFragment showing device not supported?
Fragment back stack does not work when extending AppCompatActivity
Add INJECT_PERMISSION to app
Admob sends messages in “Ads” tag
Compound two views in one
How to make auto_fit columns for GridLayoutManager
Unable to create shadow classes with Robolectric 3 [duplicate]
Android setRequestedOrientation is not working as expected inside onResume
Using unknown number of tabs
Android Getting started with Sugar ORM
Retrofit with gson. How parse response?

Categories

HOME
android
uml
oracle12c
fuelux
gdb
eslint
ggplot2
wakanda
jax-rs
apache-spark-mllib
oracle-apex-5
modal-dialog
joomla3.0
teechart
pattern-matching
drop-down-menu
scrolltop
mapstruct
cfml
bourbon
asp.net-core-webapi
database-connection
spring-async
pagespeed
perlbrew
inversion-of-control
openmdao
sqlpackage
realm-mobile-platform
testbed
git-squash
clickjacking
activexobject
fossil
html-encode
slacktextviewcontroller
getlasterror
openerp-7
amazon-ses
diacritics
demo
doc
oracle-service-bus
oim
monkey-testing
mesosphere
linter
reportservice2010
netbeans6.8
spring-data-couchbase
excel-dna
cmp
juice-ui
smartfoxserver
node-request
google-cloud-console
vulcanize
uicolor
beamer
x-tag
scaffolding
clipboard.js
lua-telegram-bot
riot
bizagi
toast
forwarding
extjs-grid
alloy-ui
omnifaces
node-serialport
uvc
phpldapadmin
grouping-sets
webmatrix-3
webfinger
angular-carousel
template-deduction
wxformbuilder
terminate
sbcl
openargs
light
http-patch
kendo-dataviz
dtmf
workitem
merb
css-reset
wimax
correlated-subquery
cgimage
cdonts
svk
opml
web-application-project
mathematical-typesetting
pnrp

Resources

Encrypt Message