aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgData.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/cgData.java')
-rw-r--r--main/src/cgeo/geocaching/cgData.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java
index 28485a5..d5002a0 100644
--- a/main/src/cgeo/geocaching/cgData.java
+++ b/main/src/cgeo/geocaching/cgData.java
@@ -33,6 +33,7 @@ import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.EnumSet;
@@ -85,7 +86,7 @@ public class cgData {
private static int[] cacheColumnIndex;
private static CacheCache cacheCache = new CacheCache();
private static SQLiteDatabase database = null;
- private static final int dbVersion = 66;
+ private static final int dbVersion = 67;
public static final int customListIdOffset = 10;
private static final String dbName = "data";
private static final String dbTableCaches = "cg_caches";
@@ -107,7 +108,7 @@ public class cgData {
+ "detailedupdate long, "
+ "visiteddate long, "
+ "geocode text unique not null, "
- + "reason integer not null default 0, " // cached, favourite...
+ + "reason integer not null default 0, " // cached, favorite...
+ "cacheid text, "
+ "guid text, "
+ "type text, "
@@ -674,6 +675,16 @@ public class cgData {
}
}
+ // issue2662 OC: Leichtes Klettern / Easy climbing
+ if (oldVersion < 67) {
+ try {
+ db.execSQL("update " + dbTableAttributes + " set attribute = 'easy_climbing_yes' where geocode like 'OC%' and attribute = 'climbing_yes'");
+ db.execSQL("update " + dbTableAttributes + " set attribute = 'easy_climbing_no' where geocode like 'OC%' and attribute = 'climbing_no'");
+ } catch (Exception e) {
+ Log.e("Failed to upgrade to ver. 67", e);
+
+ }
+ }
}
db.setTransactionSuccessful();
@@ -1396,7 +1407,7 @@ public class cgData {
* @param geocodes
* @return Set of loaded caches. Never null.
*/
- public static Set<Geocache> loadCaches(final Set<String> geocodes, final EnumSet<LoadFlag> loadFlags) {
+ public static Set<Geocache> loadCaches(final Collection<String> geocodes, final EnumSet<LoadFlag> loadFlags) {
if (CollectionUtils.isEmpty(geocodes)) {
return new HashSet<Geocache>();
}