Public Access
feat(library): finish games from the ending achievement or suggest it
This commit is contained in:
1 parent
c2d17d0bc7
commit
b959542e23
31 files changed
+1072
-34
No files matched your search
@@ -0,0 +1,23 @@
|
||||
-- Share of all Steam players who unlocked the achievement, from GetGlobalAchievementPercentagesForApp. Null until
|
||||
-- the next schema refresh fetched it.
|
||||
ALTER TABLE game_achievement_schema ADD COLUMN global_percent DOUBLE PRECISION;
|
||||
|
||||
-- A game without an end (sandbox, survival, 4X, simulator, MMO), from IGDB: playtime says nothing about "finished".
|
||||
-- Null until the next mood refresh, and when IGDB has no tags for the game.
|
||||
ALTER TABLE game_mood ADD COLUMN endless BOOLEAN;
|
||||
|
||||
-- The strongest finished hint the user answered with "Not yet": ENDING or PLAYTIME.
|
||||
ALTER TABLE user_game ADD COLUMN finished_hint_dismissed VARCHAR(16);
|
||||
|
||||
-- The next library sync fetches every schema and mood again, so the new columns get filled.
|
||||
UPDATE game_achievement_schema_meta SET refreshed_at = TIMESTAMPTZ 'epoch' WHERE has_schema;
|
||||
UPDATE game_mood SET checked_at = TIMESTAMPTZ 'epoch';
|
||||
|
||||
-- True once the user chose the status (by hand, or when adding a game by hand). Core sets FINISHED by itself only
|
||||
-- while it is false. For the rows of today: the sync gives BACKLOG (first seen unplayed, the status stays when the
|
||||
-- game is played later) or PLAYING (first seen played). Any other status, PLAYING without playtime, or a rating,
|
||||
-- note or priority counts as chosen.
|
||||
ALTER TABLE user_game ADD COLUMN status_set_by_user BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
UPDATE user_game SET status_set_by_user = TRUE
|
||||
WHERE source = 'MANUAL' OR rating IS NOT NULL OR notes IS NOT NULL OR priority IS NOT NULL
|
||||
OR NOT (status = 'BACKLOG' OR (status = 'PLAYING' AND playtime_minutes > 0));
|
||||
Reference in new issue
Block a user