We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e45114 commit d0656abCopy full SHA for d0656ab
android/src/main/java/vn/hunghd/flutterdownloader/TaskDbHelper.java
@@ -56,8 +56,12 @@ public void onCreate(SQLiteDatabase db) {
56
57
@Override
58
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
59
- db.execSQL(SQL_DELETE_ENTRIES);
60
- onCreate(db);
+ if (oldVersion == 2 && newVersion == 3) {
+ db.execSQL("ALTER TABLE " + TaskEntry.TABLE_NAME + " ADD COLUMN " + TaskEntry.COLUMN_SAVE_IN_PUBLIC_STORAGE + " TINYINT DEFAULT 0");
61
+ } else {
62
+ db.execSQL(SQL_DELETE_ENTRIES);
63
+ onCreate(db);
64
+ }
65
}
66
67
0 commit comments