Skip to content

CACHE_TYPE_ID changes #2024

@andrixnet

Description

@andrixnet

Migrating OCNA also means importing several new/different cache types ( part of #860 ), some of which have overlapping IDs with opencaching-pl code.

As detailed in the documentation here: https://wiki.opencaching.eu/index.php?title=Cache_types
there are several cache types for which the ID must be changed to ensure uniqueness, which is critical for consistent code and deployment across sites.

The following changes are needed:

  • Moving cache ID = 8 -> new ID = 9 (overlapping with OCDE)
  • Geopath final cache ID = 9 -> REMOVE
  • MP3 cache ID = 9 -> removed
  • Owncache ID = 10 -> new ID = 11 (overlapping with OCDE and old OCNA)
  • Guestbook cache ID = 10 -> new ID = 13 (overlapping with OCDE and old OCNA)
  • BIT cache ID = 12 -> new ID = 12 (OCNA only)
  • Benchmark ID = n/a -> new ID = 14 (OCNA only)
  • Challenge ID = n/a -> new ID = 15 (OCNA only)

While some overlaps are noted with OCDE only, I believe it is best practice to ensure uniqueness overall.

Things needed to be done:

  • code changes where these IDs are in the code.

  • cache.php

  • GeoCache model

  • search page

  • map filters

  • My Routes module

  • GeoPath module

  • HTML templates and Javascript (where applicable)

  • en language file

  • all other languages

  • cache_type table

  • caches table

  • database contents - existing data must be updated. (create SQL queries)

  • deployment on all nodes, code and database contents change.

There are a few caches unique to OCNA, but the same queries will also update the contents of their existing caches.

I am studying the database layout and contents, and will attempt to produce SQL queries to make the changes.
I am asking for help for code changes, especially since while searching for places where changes are needed I might miss some.

Once the queries are created, I am also asking for help in deploying the database changes using the new method. This is a small but important change and it changes contents of caches. I desire to proceed with utmost care and being my first time generating a DB change with the new method I am reluctant to do it on this scale.

Thank you.