Skip to content

feat(v3-ref-seller): replace Base.metadata.create_all with Alembic migrations (cross-link #382) #421

Closed

Description

@bokelley

Context

Base.metadata.create_all is idempotent on table existence but silently misses column renames and type changes. Adopters who pulled mid-rename during the recent broadening cycle hit NULL bugs because existing tables weren't altered.

Acceptance Criteria

Refs

Activity

  1. added
    enhancement
    claude-triaging
    on May 3, 2026
  2. bokelley commented on May 3, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Feature request
    Bucket(s): examples
    Status: deferred (fold candidate — blocked on PR #390)

    Context read:

    My take: The entire Alembic scope here belongs in PR #390 — updating the initial migration (or adding a second migration) to cover the broadening-cycle schema additions before that PR merges. Folding is better than a follow-up PR because the migration file is contiguous and the Alembic history would be cleaner with one initial migration that reflects the actual current schema.

    Blocked-on: #390 — resurfaces on merge. Commenting on #390 now to surface the gap.


    Triaged by Claude Code. Session: https://claude.ai/code/session_015VqV8vGd49wgLG3HPGch3F


    Generated by Claude Code

  3. added and removed
    claude-triaging
    on May 3, 2026
  4. bokelley commented on May 14, 2026

    @bokelley
    ContributorAuthor

    Manual re-triage — blocker resolved.

    Status of acceptance criteria as of today:

    • ✅ Alembic scaffold lands in examples/v3_reference_seller/ — done by docs(examples): Alembic migration scaffold for v3 reference seller #390 (alembic.ini, alembic/env.py, 0001_initial_schema.py, 0002_broadening_cycle.py)
    • ❌ Base.metadata.create_all replaced with alembic upgrade head on boot — not done. Still active at examples/v3_reference_seller/src/app.py:201 and seed.py:44
    • ❌ README warning — still says "boot uses create_all" at README.md:246,254

    Verdict: ready-to-draft, small (~50 LoC). migrate.py is the production entrypoint already; flip app.py boot path to run alembic upgrade head (via Config(file_) + command.upgrade(cfg, "head")), drop the README warning, leave seed.py honoring schema via Alembic too.

    Single-PR scope. No remaining blockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions