Skip to content

[BUG] : Missing Table in Canonical Schema Setup #2951

Closed

Description

@hrshjswniii

Bug Description

The wakatime_stats table (used to cache and display the user's daily WakaTime coding summaries) is defined in the database migration file supabase/migrations/20260526000000_add_wakatime_stats.sql but has not been backported into the canonical database script supabase/schema.sql.

Because of this, self-hosting developers who set up their database tables using schema.sql (as instructed in the Architecture guidelines) will be missing the wakatime_stats table. When they later try to link WakaTime and run a metrics sync, the sync fails with SQL errors because the table does not exist.

I expected the canonical supabase/schema.sql to represent the complete, production-ready schema containing all tables currently used by the application, including wakatime_stats.

Steps to Reproduce

  1. Initialize a clean PostgreSQL database using only the supabase/schema.sql
    script.

  2. Verify the list of tables created (e.g. users, goals, streak_freezes, etc.). Notice that wakatime_stats is not present.

  3. Configure WAKATIME_CLIENT_ID and WAKATIME_CLIENT_SECRET environment variables.

  4. Try to trigger a sync via the /api/wakatime/sync endpoint.

  5. Check server logs or API response, showing a PostgreSQL error: relation "public.wakatime_stats" does not exist.

Affected Area

Other

Screenshots

No response

Browser & OS

All Browsers & OS (Database level issue)

Environment

None

Additional Context

No response

Activity

  1. yachikadev commented on Jul 1, 2026

    @yachikadev
    Contributor

    hii i would like to work on this contributing under gssoc'26

  2. github-actions commented on Jul 1, 2026

    @github-actions

    Assigned to @yachikadev! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

  3. github-actions commented on Jul 12, 2026

    @github-actions

    ✅ Closed as completed!

    If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-triageNeeds maintainer triage

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions