Skip to content

Bug: postgresql.UUID used in 5 more model files — breaks SQLite dev/test #2495

@mrveiss

Description

@mrveiss

Problem

PR #2424 (#2402) fixed workflow_permission.py to use dialect-neutral sqlalchemy.types.Uuid, but 5 other model files still import from sqlalchemy.dialects.postgresql import UUID:

  • autobot-backend/user_management/models/role.py
  • autobot-backend/user_management/models/base.py (also in type_annotation_map)
  • autobot-backend/user_management/models/mfa.py
  • autobot-backend/models/agent.py
  • autobot-backend/models/agent_org.py

Migration files also use it but those are PostgreSQL-specific by nature and don't need changing.

Discovered During

Implementation of #2402 — agent noted the pattern exists in other files.

Suggested Fix

Apply the same fix as #2402: replace sqlalchemy.dialects.postgresql.UUID with sqlalchemy.types.Uuid in all 5 model files. The base.py type_annotation_map also needs updating.

Impact

Medium — Any test touching these models on SQLite will fail with dialect errors.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions