FastAPI (Python Framework) - Auto-Generating Migrations with Alembic & SQLAlchemy

preview_player
Показать описание
In this video tutorial we will setup the project using the fastapi-starter-kit and then we will create the models using the SQLAlchemy.
I will also walk you though the installing and configuring the Alembic to use the SQLAlchemy model for generating the migrations.
After configuration, we will execute the migration command and we will verify the table in MySQL database.
We will also learn what happens when you change (add or remove etc) any fields for the model that you have already generated the migration for. How to generate the migration for field change etc.
And in the end we will check how can we drop the entire database table using single command.

I will encourage you to start with the starter-kit project and then follow me along. This will you will learn every bit.
Рекомендации по теме
Комментарии
Автор

Bonne explication, j'ai pu implémenter sur un projet sur lequel je travaille après quelques modifications, je suis capable de migrer sans problème.

shokays
Автор

I’ve a basic doubt, I generally install all requirements in virtualenv, but you are doing without virtualenv, so which approach is good?

fitbouncer
Автор

We can do auto-generating migrations with Alembic & SQLAlchemy when we run the Fast API application.
How can we do that?

durgamokshitha