Skip to content

CountByDateAsync throws NotSupportedException for non-SQLite — will crash on SQL Server #1194

@Chris0Jeky

Description

@Chris0Jeky

Summary

AuditLogRepository.CountByDateAsync explicitly throws NotSupportedException for non-SQLite databases. StreakService calls it unconditionally. Any SQL Server deployment will crash at runtime on every call.

Location

backend/src/Taskdeck.Infrastructure/Repositories/AuditLogRepository.cs, lines 282-286

Suggested Fix

Implement the non-SQLite path using EF.Functions.DateDiffDay or raw SQL, or guard in StreakService to return empty result rather than throw.

Source

Found during codebase health analysis (2026-06-06).

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't working

    Projects

    Status
    Pending

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions