traccar-client-android icon indicating copy to clipboard operation
traccar-client-android copied to clipboard

Upgrades lose unsent position log entries

Open luke-jr opened this issue 6 years ago • 2 comments

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS position;");
        onCreate(db);
    }

Imagine if the traccar server is down for a day, and the app gets upgraded in the middle of it - suddenly, the entire day's locations up to that point are lost...?

luke-jr avatar Sep 01 '18 22:09 luke-jr

That's a possibility, but it's a very rare case. We almost never upgrade database schema and you need to get an upgrade exactly when you have large amount of stored data, which should also be a relatively rare case. I don't think it's a high priority issue, but if someone wants to fix it, pull requests are welcome.

tananaev avatar Sep 01 '18 22:09 tananaev

@oliv3

Also, having a server down for a day should just never happen, from a sysadmin point of view.

Another possibility is that there's a wifi connection that only allows access to Google Play...

luke-jr avatar Sep 02 '18 03:09 luke-jr