Skip to content

Migrate Postgres timestamps to TIMESTAMP WITH TIME ZONE #317

@peteski22

Description

@peteski22

Part of #257 — Phase 3 step (2).
RFC: #275.

Blocked by the datetime-at-store-boundary Phase 3 child.

Scope

Migrate Postgres timestamp columns from TEXT to
TIMESTAMP WITH TIME ZONE. Includes Alembic migration with data
conversion (parsing the existing ISO strings). SQLite continues to
store ISO strings for now — no SQLite migration in this child.

Definition of Done

  • Alembic migration runs on a populated testcontainers Postgres in
    CI and converts data without loss.
  • Round-trip tests confirm datetime values come back identically
    on both backends.
  • Full test suite green.
  • Lint clean.
  • Operator-facing note in deployment docs: this migration rewrites
    data in knowledge_units (timestamps); plan a maintenance window
    for large tables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestknowledge-modelKnowledge unit schema and data modelteam-apiTeam API / Docker component

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions