Gracefully handle package downgrade (fix #350)
Этот коммит содержится в:
@@ -90,6 +90,11 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
onCreate(db);
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS position;");
|
||||||
|
onCreate(db);
|
||||||
|
}
|
||||||
|
|
||||||
public void insertPosition(Position position) {
|
public void insertPosition(Position position) {
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
values.put("deviceId", position.getDeviceId());
|
values.put("deviceId", position.getDeviceId());
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user