New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android.database.sqlite.SQLiteException: Can't downgrade database from version 35 to 33 #42
Comments
Ooops that's my bad. Can you please checkout the code, change the line that inludes |
thank for your quick reply. You're right that will be the fastest way Cheers, and thanks for orman. On Fri, Jan 20, 2012 at 3:00 PM, ahmet alp balkan
|
That's a good idea. The reason it is coded that way is because I thought it was about "version of SQLite" rather than the version of the app db. Totally a misconception, sorry about that. Hope you have fixed it for yourself, I'll roll out a fix soon when I have time. Thanks for reporting the bug. |
It's fine for me now, I added the constructor and built the project without any problems. |
Great, feel free to submit a pull request anytime. |
may this will be of use to you http://www.enterra-inc.com/techzone/handling_sql_issues/ |
In order to upgrade my schema I've created my own SQLiteOpenHelper which does the upgrades at startup. In my last update, something bad happened: Users are reporting this error...
Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 35 to 33
at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:307)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:168)
at org.orman.dbms.sqliteandroid.SQLiteAndroid.(SQLiteAndroid.java:39)
[...]
And indeed, my db version went from 33 to 34. I saw in the orman code the following line:
public class SQLiteAndroid extends SQLiteOpenHelper implements Database {
private static final int SQLITE_VERSION = 33; //TODO read from somewhere else ASAP
... and I'm suspecting that this could be causing the problem.
Right now I'm a bit at a loss here, do you see a possibility for a quick fix?
The text was updated successfully, but these errors were encountered: