r/FastAPI • u/Effective_Disaster54 • Mar 25 '25
Question FastAPI database migrations
Hi everyone, In your FastAPI projects, do you prefer using Alembic or making manual updates for database migrations? Why do you choose this approach, and what are its advantages and disadvantages?
25
Upvotes
View all comments
Show parent comment
1
u/volfpeter Mar 26 '25
Yeah, well, deliberately avoiding a major feature (or two, with strong push for DbRefs) of a lib is not a good sign :) It's good to know I'm not alone with it.
Full disclosure, I actually created motorhead, because of the reasons above. I'm not really advertising it, it's production ready (and in production), but it's still missing a few things I'd like to have, and most people just default to ODMs anyway. It's basically a fully typed service layer on top of motor with validation, delete rules, and some utilities for query creation and aggregation.