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

Override default notification led color
Eclipse Library is not showing
“aapt.exe” exited with code -1073741819
How to retain image quality after uploading it to a server?
How to animate view with accelerometer?
How to make listview selected item selectable?
Saving the activity to a static variable in order to avoid garbage collection
Update pre-loaded database with existing data
Android Lollipop home button return animation
how to show softkeyboard on android lollipop emulator
Trouble setting custom view in my ListAdapter
how to call data from activity to another without the button only display the data inside the database [duplicate]
Cant make toggle arrow working (Android Studio)
Hot Code Push doesn't work on device in Meteor
Android - Set onEditListener for all EditTexts under a parent
Google-cloud-messaging/gcm push notification not delivered to client

Categories

HOME
beautifulsoup
twitter-bootstrap-3
hyperlink
eslint
merge
angular2-material
pdfbox
javacc
newrelic
big-o
banner
rtf
spring-social
onedrive-api
magnetic-cards
flatpak
coin3d
internationalization
google-picker
systemtime
siri
opentk
custom-post-type
mat
nstimer
progress-bar
quantlib
carrierwave
scrollview
kudu
paragraph
installshield-le
pop3
sharding
parse-tree
metawidget
hackintosh
microsoft-metro
oracle-service-bus
android-checkbox
servermanager
httrack
term
mongotemplate
excel-dna
skin
gpg-signature
vibrate
cudd
mongodb-php
ng-grid
delta
kiosk
lz77
highland.js
concurrentmodification
sapscript
aspectj-maven-plugin
node-serialport
uvc
xml-namespaces
matrix-inverse
menubar
cfcache
eclipse-kepler
artemis
model-driven-development
kaleidoscope
diem
composite-component
stacky
device-width
joomla3.1
zope.interface
wcf-configuration
isa-swizzling
flex-mobile
google-floodlight
listactivity
http-daemon
inline-formset
cdonts
commerceserver2007
uideviceorientation
qtabbar
information-management

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