Stable Unique Card ID System #65
Labels
No labels
Bug
Feature
Feedback Wanted
Refactoring
Won't Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: waifu/kemoverse#65
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, cards in the gacha game are identified by local database IDs that depend on import order. This creates inconsistency across servers or deployments. For example, assuming we have import packs, importing "Waifu Pack 2" before "Waifu Pack 1" changes the IDs of the cards depending on insertion order.
To solve this, we could introduce a stable, deterministic global_id for each card based on its metadata. This will ensure that the same card always has the same identifier, no matter when or where it's imported.
Proposed Solution:
Add a global_id field to the cards table, generated using UUID version 5 with the pack name as a namespace and the card name as the key.
Database Schema Example
This field would be used as the canonical identifier for importing/exporting cards between servers or databases.