Skip to content

Database

tilttek/progression-bundle
TableOne row perKeyHolds
tilttek_progression_gaintrack, rule and activitytrack, rule_name, activitythe subject, the member, the amount, the moment, the season
tilttek_progression_milestonesubject, track, milestone and seasonsubject, track, milestone, seasonthe member, the moment, the activity
tilttek_progression_streak_gesturestreak and activitystreak, activitythe member, the unit, the moment
tilttek_progression_streak_freezemember, streak and unitmember, streak, unit—
tilttek_progression_streak_statemember and streakmember, streakthe current and best runs, the run's start, the last active unit, the timezone

The tables are added to the schema the ORM generates for the configured connection by ProgressionSchemaListener, so doctrine:migrations:diff writes their migration and doctrine:schema:validate does not ask to drop them.

Gains, milestones, gestures and frozen units are inserted by a statement that writes nothing when the row is there — ON CONFLICT DO NOTHING on PostgreSQL, INSERT IGNORE on MySQL and MariaDB, INSERT OR IGNORE on SQLite; elsewhere a plain insertion, whose unique violation reaches the caller —, so an activity counts once even when two processes write it. Totals are sums, never fields. Dates are written in UTC, to the second; units are day or week numbers.