Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CACHE_TYPE_ID changes #2024

Open
21 of 22 tasks
andrixnet opened this issue Apr 25, 2019 · 3 comments
Open
21 of 22 tasks

CACHE_TYPE_ID changes #2024

andrixnet opened this issue Apr 25, 2019 · 3 comments

Comments

@andrixnet
Copy link
Contributor

andrixnet commented Apr 25, 2019

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.

@andrixnet
Copy link
Contributor Author

Assigning myself as first stage to develop the SQL queries.

andrixnet added a commit to andrixnet/opencaching-pl that referenced this issue Jul 4, 2019
Stage 2: code additions and changes
Reference: opencaching#860
Reference: opencaching#2024

- modified lib/cache.php definitions (old, but still used)
- modified GeoCacheCommons.php model
- modified translations (en first)
- new types are forbidden by default lib/settingsDefault.inc.php
- partial modification src/Views/mainMap/mainMapFilters.tpl.php
@andrixnet
Copy link
Contributor Author

Further work in progress: andrixnet@7007934

Please also see questions here: #860 (comment)

@andrixnet
Copy link
Contributor Author

Changes implemented at https://github.com/andrixnet/opencaching-pl/tree/cache_type

Please see #860 (comment) for remaining details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment