Skip to content

TimeEntry: enforce teCompId integrity vs customer company #376

Description

@CryptoJones

Summary

TimeEntry.teCompId is NOT NULL but has no FK to Company, and no check that it matches the customer's company. Denormalization is fine for query performance, but without validation inconsistent rows can be stored.

Related

See also: issue for teCustId/company validation on create.

Acceptance criteria

  • App-level validation on create/update
  • Optional: DB constraint or trigger if feasible
  • Tests for mismatch rejection

Source

Code review backlog (2026-06-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions