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

Android Multi Spinner
Using a fragment as a ListView header in only one orientation
How to send a POST request with JSON data using google api client library for java?
Get application logs from android
How can I get internet on android emulator?
How to add a public key in the android project
What is special about android:inputType=“textPersonName” for EditText
Is there a way to customize the threshold for ViewPager scrolling?
Device ID recognition
Value still being read from Shared Preferences even after clearing it
How to access a C flag in Android NDK?
SyntaxError when calling navigator.splashscreen.hide() in Phonegap 1.9.0 on Android
Cannot figure out how to make android keyboard go away, unless back button is press
How to use OAuth on android to pull data into our server(not to phone)?
Unable to install Android ADT on ubintu12.04
android.database.sqlite.SQLiteException: table schedule has no column named

Categories

HOME
oracle12c
eslint
dns
android-studio-2.2
powerpoint
3d
youtube-data-api-v3
composite-primary-key
sitecore
jsf-2.2
r-googlesheets
yandex
aws-cli
alsa
code-coverage
gluon-mobile
jtextpane
angularfire2
barcode
teechart
endeca
x-cart
selenium-ide
android-intent
do-while
symfony-2.8
windows-xp
systemtime
react-toolbox
postscript
qliksense
direct3d11
roundup
flooding
testcomplete
database-comparison
turfjs
gnat-gps
sql-delete
batching
raft
openproject
cd
sessionstorage
protein-database
gdata
health-monitoring
demo
jvmti
skylink
ssrs-2014
signal-strength
openresty
serde
openblas
video-conferencing
dt
check-mk
seq
mach-o
renaming
uicolor
model-associations
synonym
tooleap
respondcms
cortex-m
libav
qbxml
fuelcms
rubaxa-sortable
dulwich
infosphere-spl
cosine-similarity
entry-point
cbind
lnk
grails-plugin-rabbitmq
windows-embedded-standard
code-duplication
mongohq
beaker-testing
facebook-timeline
cardreader
android-loadermanager
jquery-blockui
lambdaj
window-decoration
failing-tests
denied
promotion-code
rmdir
dataform
svk
diagrams
dot-emacs
tabpanel
dsl-tools
alsb

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App