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

ActionBar menu with text ,icon,text
Firebase endAt() not working with date string?
Different splash screen on screen orientation
Visual Studio 2015. AXML. Doesn't work intellisence inside view with warning
Generate content to display on an ePaper display from Android App
Fingerprint detection stop work after the app goes to pause
Gradle: “Empty” Android project takes half a minute to compile (Android Studio)
Unable to detect adb version, adb output: Syntax error: Unterminated quoted string
How to print PDF, image and HTML documents from android device to a printer on wifi?
How to create customizable fragment in android library?
How to get all reviews of “ANY” app from Google's playstore programatically?
Android 5.x Shutter Speed
Canvas DrawLine Is Invisible
Android AppRTC example: how to change microphone?
Android VideoView with HTTP Range headers
Dalvik error on adding new module to android project

Categories

HOME
checkstyle
depth
saml-2.0
jwplayer
soa
tvos
iis-6
vert.x
barcode
spin
categorical-data
siddhi
gkturnbasedmatch
plink
selectize.js
symbol
forgot-password
breadth-first-search
question2answer
dataflow-diagram
interpreter
comparator
game-theory
google-cloud-print
bulletphysics
shared
corpus
paragraph
deltaspike
angularjs-material
android-sugarorm
jett
gnat-gps
installscript
roblox
protege4
parse-tree
jpad
z-notation
bc
signals-slots
apriori
plr
berkeley-db-je
show-hide
monkey-testing
jide
ovf
pair-programming
yii2-user
seq
janus
mathcad
structuremap4
rsa-archer-grc
lrs
redis-cluster
directdraw
visual-sourcesafe-2005
mod-proxy
iced-coffeescript
liquid-layout
diff3
variadic-templates
webfinger
nsmenu
xml-namespaces
grails-domain-class
grails-plugin-rabbitmq
spring-remoting
twitter-bootstrap-rails
oocss
scmmanager
abstract-data-type
android-icons
apache-abdera
bjyauthorize
robotlegs
qtconcurrent
wcf-configuration
correlated-subquery
objectquery
virtualpathprovider
hibernateexception
denied
role
jqote
umra
uipagecontrol
objective-j
django-piston
build-environment
unmanagedresources
movieplayer
change-management
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