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 server can send event to app
MultiAutoCompleteTextView like Text messaging Application with custom users list
how should i use android pmem or ion mermory in my app?
Front facing Camera : setparameters failed Exception On Sony xperia device
i want to use 2 android themes in android manifist?
Search date using regular expression in robotium testing
system.nullreferenceexception object reference not set to an instance
Viewing database of an app stored/installed on the device in android
Run Broadcast at specific time
Arraylist display selected listview to textview
Call service method from activity
How to change programmatically the primary color in Android L
Implementing PreferenceFragment?
3G mobile data carrier shows different website
Facebook android app permission: ask for get user profile picture
send data from ArrayList<String> to String Array (Android)

Categories

HOME
android
asp.net-web-api
merge
apache-flink
dns
apache-jena
spring-data-redis
access
cq5
big-o
web-hosting
gluon-mobile
nstableheaderview
modal-dialog
barcode
rcloud
p2p
little-proxy
text-mining
x-cart
onedrive-api
gource
android-intent
intershop
jmp
enterprise-miner
database-connection
drive
visual-glitch
springfox
systemtime
xcode-ui-testing
fable-f#
shared
angularjs-components
appirater
fragment-backstack
ceylon
turfjs
dsx-desktop
apns-php
escpos
dbnull
sharp-snmp
rfc3339
pom.xml
openresty
vugen
twilio-click-to-call
lightning
google-cse
context-switch
subnet
mathcad
branch-prediction
materialized-path-pattern
redbeard-ios
envi
greatest-n-per-group
windows-azure-queues
synonym
tooleap
vorpal.js
aspen
cycle2
design-principles
linklabel
django-urls
.bash-profile
batik
ocra
airbrake
pyobjc
keyup
nsurlsessiondatatask
cakephp-2.7
uncaught-typeerror
addressing-mode
appserver
machine-instruction
psr-4
cbind
with-statement
named-parameters
winginx
clickbank
amslidemenu
oocss
inappsettingskit
flex++
pstack
saleslogix
listitem
jsr286
ikimagebrowserview
user-tracking
matlab-load
metaweblog
silverlight-oob
lobo-cobra
dojo-dnd
software-lifecycle
wysiwym

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