Add idempotent Alembic migrations, auto-migrate on startup, update summary

Rewrite migrations to raw SQL with IF NOT EXISTS/EXCEPTION guards for
full idempotency. Add notes table migration (0001), fix migration chain,
and run alembic upgrade head in Dockerfile CMD on container start.
Update summary.md with Phase 3.5 changes and Alembic instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 23:55:40 -05:00
parent 22a3a3c1d1
commit e2338918b0
4 changed files with 232 additions and 95 deletions
+1 -1
View File
@@ -22,4 +22,4 @@ COPY alembic/ alembic/
ENV PYTHONPATH=/app/src
EXPOSE 5000
CMD ["hypercorn", "fabledassistant.app:create_app()", "--bind", "0.0.0.0:5000"]
CMD ["sh", "-c", "(alembic stamp --purge base 2>/dev/null || true) && alembic upgrade head && hypercorn 'fabledassistant.app:create_app()' --bind 0.0.0.0:5000"]