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

Not able to sign out user properly: android
Audio Playing But Video not Showing in VideoView Android (Black Screen in Low Internet)
How can I recognize this app error and fix it
Intent for viewing incoming email messages/opening email app
Is it possible to display the real device like the emulator?
java.lang.annotation.AnnotationFormatError while running roboelectric test cases on Jenkins
Kotlin Android Library Module exported with gradle maven-publish plugin not adding dependencies
In Build gradle, it showing error one after another. can anyone sort out what is wrong? the error and code mentioned below
Two AsyncTasks block each others
Recyclerview is starting from bottom
How to get info (total, free) from /system directory
Reuse TextureView with different videoplayers
How to know if user is typing or message has been delivered to him in Chat App
Android List View with horizontal Layout but Scroll Vertically that replace text view
AWS Cognito sign up error
What path Is the issue.ignore.path element in lint.xml relative to?

Categories

HOME
search
oracle12c
facebook-oauth
delphi-7
telegram
android-studio-2.2
object
angular-formly
numbers
interface
rendering
google-cloud-functions
scripting
cq5
mips
startup
speech-synthesis
nancy
dynatrace
searchview
standards
identity-management
cfml
ksh
href
gulp-watch
windows-server-2003
xcode-ui-testing
has-and-belongs-to-many
glib
r-grid
fstream
spring-security4
mailkit
login-script
keras-layer
joomla2.5
reactjs.net
xajax
magento-1.9.2.4
modernizr
android-augmented-reality
amazon-ses
verifiable-c
magento-1.9.3
datacachefactory
portforwarding
movilizer
smoothstate.js
avcapturedevice
opencmis
jide
pom.xml
clarifai
robomongo
page-replacement
java-6
mach-o
d3-force-directed
cpu-cache
pytables
stax
ziparchive
pacemaker
jboss-tools
eigenvector
respondcms
embedding
freepbx
stream-processing
project-organization
halcon
rasterize
grgit
gocql
coda
linked-tables
graphics2d
omnifaces
kubuntu
apache-spark-1.3
iiop
cuba
live555
buffering
radiant
bin
eclipse-kepler
scmmanager
wp7test
chart-director
pstack
qtconcurrent
vfs
fusefabric
koken
floating-point-exceptions
clrstoredprocedure
timthumb
dataform
svk
objective-j
updatesourcetrigger
easyb
interprocess
application-verifier
zen
lobo-cobra
unmanagedresources
technical-debt

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile