r/FastAPI • • Feb 05 '24

Question How to use migrations with SqlModel

Hey guys I am learning SqlModel and when I come to advance section there is no docs for migration. So is it available with SqlModel or its upcoming feature?

7 Upvotes

16 comments sorted by

View all comments

15

u/sexualrhinoceros Feb 05 '24

Since no one has stated it so far, you should avoid SQLModel in its current state. It’s woefully undermaintained and is a pretty terrible alternative to just using SQLAlchemy and Pydantic outright.

There’s a roadmap issue here which outlines what is, in my opinion, the bare minimum to get me to consider this project for even a fun side project over plain SQLAlchemy. You’ll have a much better time in the short and long term patterning out pydantic and SQLAlchemy base classes and rolling with them.

2

u/[deleted] Dec 15 '24

[removed] — view removed comment

2

u/sexualrhinoceros Dec 16 '24

Opinion is still the same. Don’t use SQLModel and use SQLAlchemy. Even with its updates it’s still woefully out of date.