Skip to content

refactor(api): lifespan and remove create_all - #18

Merged
ayoub3bidi merged 1 commit into
mainfrom
feat/lifespan
May 30, 2026
Merged

refactor(api): lifespan and remove create_all#18
ayoub3bidi merged 1 commit into
mainfrom
feat/lifespan

Conversation

@ayoub3bidi

Copy link
Copy Markdown
Owner

Removes SQLAlchemy create_all on import. Redis init moves to FastAPI lifespan.

Made with Cursor

@ayoub3bidi
ayoub3bidi force-pushed the feat/readme-guide branch from d1e2797 to cdf46b8 Compare May 30, 2026 08:57
Base automatically changed from feat/readme-guide to main May 30, 2026 08:58
Flyway remains the schema source of truth. Redis initializes in the
FastAPI lifespan context instead of at import time.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ayoub3bidi

Copy link
Copy Markdown
Owner Author

Branch cleanup

Reset to main, cherry-picked only lifespan commit (src/main.py).

Verification

  • Flyway V1–V3 OK (schema via migrations, no create_all)
  • API logs: lifespan startup complete, no errors
  • GET /v1/health 200 · POST /v1/token 200

@ayoub3bidi
ayoub3bidi merged commit 9ad92c4 into main May 30, 2026
3 checks passed
@ayoub3bidi
ayoub3bidi deleted the feat/lifespan branch May 30, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant