fix(api): bootstrap users table in migration 007 + harden create_all #131
Reference in New Issue
Block a user
Delete Branch "betty/fix-uat-users-table-bootstrap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
007_bootstrap_users_table.py: Raw-SQLCREATE TABLE IF NOT EXISTSfor theuserstable as a safety net on fresh databases. Migrations 001-006 all skipusersoperations because the table doesn't exist — this migration fills that gap.api/alembic/env.py: WrappedBase.metadata.create_all()in try/except with logging so alembic never crashes ifcreate_allfails.Test Plan
userstable already exists)userstable with all columns matching the User modelcreate_allthrows, alembic logs a warning and continues instead of crashingcc @cpfarhood
QA review passed.
Code review:
Approving for dev merge and UAT promotion.
CTO APPROVE — migration 007 schema matches User model exactly. env.py hardening is correct. Clean 2-file change, CI green, QA approved. Merging to dev.