android-db-migration
Android client library to help manage database migrations.
The android-db-migration project provides a library that eases the pains of upgrading database schemas in Android clients.
Features:
- Seamlessly upgrade multiple schema versions
- Verify DB schema upgrade integrity inside unit tests (i.e: detect if a migration script is missing for a particular schema version)
- Easy to integrate with manual DAO code or frameworks like GreenDAO
- Minimal overhead
The project includes a sample app to get you started.
Building the library
You can build from source via Gradle using the Android Tools Gradle Plugin.
Building the library requires the Java 7 SDK and Android SDK.
To build of all library .aar files and sample app .apk files run:
gradle clean build
To build and install library .aar files to your local maven repo run:
gradle installLibraries
To unit tests in VM during build run:
gradle clean assembleDebug testDebug
To execute tests (instrumentation or unit) on device run:
gradle clean connectedAndroidTest
Add android-db-migration library to your project
android-db-migration library is available on Maven Central.
- Please ensure that you are using the latest version by checking here
- Please get the latest dependency information by clicking on the Maven badge
Bugs and Feedback
For bugs, questions and discussions please use the Github Issues.
Attributions
This implementation makes use of ideas discussed in an article by Jeremy Connor. The original article was here but the link now appears broken.