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

publishing an android library on Bitbucket as a maven artifact issues
Android ble auto disconnect
delete sent sms using Receiver's Number instead of Sender's number
Material divider after category preference
Simple select statement of SQLite takes 15 sec to fetch 17 records
Load symbols from precompiled shared library
Firebase messaging without server XMPP server - Proposal
Displaying Allow app to access device's location
How to update Android Things-Apps?
FCM and Azure notification hub register
Converting Bitmap into base64 string and saving in Shared Preference
layout change when run on other mobile
How do I automatically upload the file to server which I took to a cloud storage like Google Drive or Dropbox in android application?
How to show popup from library to android application
How to send GPS to a android emulator
How to share PDF file from internal cache directory via Viber

Categories

HOME
eclipse
search
turing-machines
awk
merge
alexa-skills-kit
ns-3
apiblueprint
alarm
yandex
rom
dojo
bookmarks
polling
pkcs#11
recordrtc
bing-maps
syntaxnet
openstreetmap
bitnami
keytool
event-sourcing
symfony-2.8
atlassian-stash
mvc-mini-profiler
google-content-api
sar
breadth-first-search
question2answer
syntax-highlighting
angularjs-components
fragment-backstack
failover
mql
anki
scatter3d
mustache
activexobject
indy10
fiware-cygnus
navigator
hivemq
openerp-7
google-knowledge-graph
watchman
ods
p4merge
doc
levenshtein-distance
plr
oracle-service-bus
contract
snapchat
ovf
automapper-5
dbcontext
carrot2
azure-cli
spring-data-couchbase
filenet
google-cloud-console
vulcanize
iotivity
spring-cloud-feign
dup
http-status-code-401
nservicebus5
yajsw
cortex-m
grass
concept-insights
decimalformat
roadkill-wiki
lasso
aspectj-maven-plugin
diff3
openbabel
adehabitathr
apache-spark-1.3
variadic-templates
rapidsvn
showdialog
sonarqube-5.0
strawberry-perl
ignite-ui
ss7
grails-domain-class
jjaql
spring-remoting
mutual-authentication
paste
renderer
light
rolify
kaleidoscope
facebook-timeline
pclzip
wimax
idn
qtconcurrent
pyunit
azman
relative
lr
socketserver
cloudfiles
mtu
photolibrary
qglwidget
facebook-iframe
jqueryform
lemmatization
cardspace

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