Skip to content

Label addition docs: the auto_migrate trap, the migrate_updates contract, the ordering caveat #334

Description

@0x054

Parent

Spec: #329.

What to build

The documentation that makes the remaining sharp edge a known edge instead of a production surprise. The auto-migrate docs state loudly that plain auto_migrate never evolves existing objects — enum types included — and that this particular gap is structurally invisible to tests, because fresh schemas always get the complete label set (#328's core finding). migrate_updates=True is documented as the answer, with the label-addition contract spelled out: append-only, warn-never-act for removals, the reviewed-migration exit, and the end-of-order caveat for ORDER BY on enum columns. The Alembic page documents the comparator's behavior.

Examples follow house rules: every field declaration shown in both Assignment and Annotated styles; queries use lambda predicates.

Acceptance criteria

  • Auto-migrate docs carry the enum-drift trap prominently, with the fresh-schema/test-invisibility explanation
  • Label addition contract documented: gating, append-only scope, warnings, ordering caveat, Alembic exit for removals
  • Alembic bridge docs cover the comparator (additions, autocommit wrapping, extra-label comments)
  • Examples show both declaration styles and lambda predicates, and pass the docs-examples test seam

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions