public static void migrateGotoHistory(final Context context) {
        withAccessLock(() -> {

            init();

            final String sql = "INSERT INTO " + dbTableWaypoints + " (geocode, updated, type, prefix, lookup, name, latitude, longitude, note, own, visited, user_note, org_coords_empty, calc_state)"
                    + " VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
            final SQLiteStatement statement = database.compileStatement(sql);

            try (Cursor cursor = database.query(dbTableSearchDestinationHistory, new String[]{"_id", "date", "latitude", "longitude"}, null, null, null, null, "_id DESC", "5")) {
                int sequence = 1;
                if (cursor.moveToLast()) {
                    do {
                        statement.bindString(1, InternalConnector.GEOCODE_HISTORY_CACHE);  // geocode
                        statement.bindLong(2, getLongDate(cursor));                      // updated
                        statement.bindString(3, "waypoint");                         // type
                        statement.bindString(4, "00");                               // prefix
                        statement.bindString(5, "---");                              // lookup
                        statement.bindString(6, context.getString(R.string.wp_waypoint) + " " + sequence);      // name
                        statement.bindDouble(7, getDouble(cursor, "latitude"));      // latitude
                        statement.bindDouble(8, getDouble(cursor, "longitude"));     // longitude
                        statement.bindString(9, "");                                 // note
                        statement.bindLong(10, 1);                                 // own
                        statement.bindLong(11, 0);                                 // visited
                        statement.bindString(12, "");                                // user note
                        statement.bindLong(13, 0);                                 // org_coords_empty
                        statement.bindNull(14);                                    // calc_state
                        statement.executeInsert();
                        sequence++;
                    } while (cursor.moveToPrevious());
                }
            }

            // clear old history
            database.execSQL("DELETE FROM " + dbTableSearchDestinationHistory);
        });
    }
migrate most recent history waypoints (up to 5)
(temporary workaround for on demand migration of the old "go to" history,
should be removed after some grace period, probably end of 2020?)
main/src/main/java/cgeo/geocaching/storage/DataStore.java