mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-05-01 18:23:56 +00:00
* Add multiplayer, cloud sync, crash reporting, scene player, and memories features * Fix multiplayer overlay showing "Waiting for ..." with no names * Fix OGL link in README * Update README with architecture, backend setup, environment variables, and CI docs * Fix save editor showing wrong name for orphaned save slots Players.gsi could fall out of sync with save files during cloud sync because the saveSlotWritten event only tracked the slot file and History.gsi for incremental upload, not Players.gsi. This caused slots without a matching Players.gsi entry to display the first player's name due to a fallback to index 0. - Track Players.gsi in saveSlotWritten handler for incremental uploads - Remove broken fallback to player index 0 in name resolution - Hide save slots with no Players.gsi entry from the save editor UI
21 lines
832 B
SQL
21 lines
832 B
SQL
-- Drop redundant char_index/display_name columns (always equal to participants[0])
|
|
-- and enforce non-empty participants via CHECK constraint.
|
|
CREATE TABLE IF NOT EXISTS memory_completions_new (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
user_id TEXT NOT NULL,
|
|
object_id INTEGER NOT NULL,
|
|
event_id TEXT NOT NULL,
|
|
completed_at INTEGER NOT NULL,
|
|
participants TEXT NOT NULL CHECK(json_array_length(participants) > 0),
|
|
UNIQUE(user_id, event_id)
|
|
);
|
|
|
|
INSERT OR IGNORE INTO memory_completions_new (id, user_id, object_id, event_id, completed_at, participants)
|
|
SELECT id, user_id, object_id, event_id, completed_at, participants
|
|
FROM memory_completions
|
|
WHERE json_array_length(participants) > 0;
|
|
|
|
DROP TABLE IF EXISTS memory_completions;
|
|
|
|
ALTER TABLE memory_completions_new RENAME TO memory_completions;
|