Database migrations matter! Get up and running with Alembic + sqlmodel

preview_player
Показать описание
In this video we will show you how to use Alembic in combination with sqlmodel.

After briefly discussing what a database version control system does, we look at how to get started step by step.

We will run into some (common) errors which I left in because I think you can learn from them.

We also quickly look at what happens when you add a required (or not nullable) column when there is already data the database and I compare it to my experience with Django's migration system.

We hope this makes it easier to start using Alembic together with sqlmodel.

---
We appreciate any feedback 💡 - please use this form so we can always make our content better:
Рекомендации по теме
Комментарии
Автор

good stuff! Was looking at this specific combo late last week.

JasonRahm
Автор

Great video, thanks! Beside the basic FastAPI / SQLModel setup (which, to be fair, are already greatly covered in the FastAPI docs) there is very little deeper content. For example: what's a good (file)structure for a big FastAPI app including SQLModel and Alembic. Or: how to deal with bigger models and especially m:n relations, there the FastAPI docs are thinning out. Maybe these are ideas for you.

AlephPerso
Автор

really thanks for this video! it has been essential for me, very clear and pragmatic!

tidytrading
Автор

great vid, thanks for explaining both libraries so clearly.

juvewan
Автор

Just to make sure i get the "DRY" thing, following this... I conclude that the best practice will be to import my "SQLModel" from my "app" throughout all my files app that require it?

wa.
Автор

Hi! Thanks for the video, very helpful. Is there anybody who managed to define joined table inheritance with SQLModel?

LucaCitelli