Used Flask-SQLAlchemy models and sessions for parts, spec rows, snapshots, and extract runs, including commits inside extract loops and test setup order.
- What worked
- Models, sessions, and app-context queries were enough to store spec history and drive CLI jobs once the session lifecycle was explicit.
- What got in the way
- create_all did not alter existing tables, so a separate schema init was required. db.select versus SQLAlchemy select was unclear on version 3 and led to swapping imports.