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

Text field from a ListView
Android SQLite best practice for memory performance
SQLiteDatabase.loadLibs Fatal signal 11 when using x86 native library
ffmpeg Build Output is not showing?
How to support ui for different medias like iphones,tablets,android phones
List Row not updated with use of Dialog
Check the fist item of my ListView
Pass data from Activity to fragment
connection from Android device to pc using socket? [duplicate]
Android stop notification in status bar while receiving message
how to display map using mapview
DatePicker dialog after reselecting datepicker shows current date
Debugging cocos 2d-x android project with ndk
R can not be resolved as a variable error when creating a new android project [duplicate]
How to save and load state of an application during change of screen orientation in android
SQLite return value incorrect

Categories

HOME
uml
django
phantom-dsl
jpa
paraview
telegram
interface
camera
sh
javacc
rds
vxml
crystal-reports-2013
lanczos
google-chrome-app
fhir
symmetricds
atlassian
firefox-addon
red5
nodemcu
delphi-xe5
undertow
react-toolbox
exploit
interpreter
direct3d11
google-api-client
mount
xcode-ui-testing
surveymonkey
stackexchange
handler
sinch
paperjs
jaws
corenlp-server
userdefaults
postback
laravel-eloquent
odroid
stringtokenizer
apriori
datacachefactory
portforwarding
importerror
signal-strength
stylecop
httrack
openal
configurationmanager
tinymce-3
datamaps
google-cse
payara-micro
oracleclient
dt
pdf-conversion
janus
envi
segment-io
pre-build-event
riot
turbo-prolog
fuzzywuzzy
piracy-prevention
linklabel
tfs-workitem
vigenere
finalbuilder
avahi
omnifaces
teamcity-9.1
aspectj-maven-plugin
umlgraph
xmltype
infosphere-spl
at-job
ssis-data-flow
entry-point
create.js
kissfft
xml-dsig
grails-plugin-rabbitmq
winginx
vsx
high-resolution
model-driven-development
mongohq
kogrid
flex++
server-administration
swfobject
joomla3.1
patricia-trie
os.system
boost-signals
inkcanvas
jdb
azman
isa-swizzling
floating-point-exceptions
tournament
cac
aspmenu
message-passing
appliance
great-circle

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