KSP-SpaceDock / SpaceDock

Current Codebase (Python /Flask)
https://spacedock.info
Other
73 stars 33 forks source link

Generic notifications #480

Closed HebaruSan closed 1 year ago

HebaruSan commented 1 year ago

Problems & motivations

KSP2 is now available and has been added to SpaceDock and is being added to CKAN.

SpaceDock's integration with CKAN is very hard-coded.

Aside from the inflexibility, there are also bugs:

As a half step toward improving this, a ksp-game-id config setting exists to control which game is used by the game version import task, but this is obviously very tightly coupled to just one game.

Changes

A migration is included to:

Note that the commit has a different author because it originated in the branch from #274 and I've just been amending it.

Fixes #329. Closes #274.

Configuration

To make the migration auto-generate a CKAN entry for KSP2, we should add this to config.ini before upgrade (re-used from #479, which will probably be in the same cluster of changes and therefore mostly superceded):

ksp2-game-id = 22407

This setting and ksp-game-id can then both be discarded after the upgrade, since the Notification table's contents replaces them.

HebaruSan commented 1 year ago

The URLs in the migration are now backwards-compatible, and V1TA5 has set the KSP2 game ID in the config. Can now merge safely.