How to Handle the Database Migrations with Alembic | Flask and Python Backend 10
Ғылым және технология
In this video I will show how to use Alembic to Handle the database migrations. I show and explain the main commands of Alembic.
This is the tenth video of a serie where I show how to build a backend with Flask and Python : • Flask
Content:
* How to install Alembic with Poetry;
* How to configure Alembic with a single database or multiple databases;
* How to create a single revision;
* How to upgrade and downgrade some revisions;
* Display the current state and the history of revisions;
* How to merge two revisions.
Repository: github.com/serlesen/backend-f...
My NEW eBook: sergiolema.dev/git-book/
Python Courses: coddy.tech/courses/python_fun...
Blog: bit.ly/47ornJL
LinkedIn: bit.ly/41Nn61q
Facebook: bit.ly/47rc9nh
My Desktop:
• Laptop: Macbook Pro 16' 2019
• Gaming Chair: amzn.to/47Vu6ed
• Mouse: amzn.to/3HoBwM1
• Desk: amzn.to/48Tc5Oi
• Screen: amzn.to/48VZkCL
Пікірлер: 20
This is how a guy looks after dealing with alembic, you can see it in his eyes
@TheDevWorldbySergioLema
Жыл бұрын
🤣
@gerardokolie1829
8 ай бұрын
😂😂
This is very good to understand Alembic. Btw note to all, video is for understanding how it works, in real world we shouldn't manually edit content in version files (it should be auto generated it for you.) What you want to edit is model files that has table schema detail.
@TheDevWorldbySergioLema
13 күн бұрын
You're right. The content files shouldn't be edited. It will cause Alembic checksum errors
my project started using alembic and i was completely unfamiliar with it, but this helped me to get a good understanding. very helpful, thank you!
@TheDevWorldbySergioLema
Жыл бұрын
So glad it helped you!
nice video. learnt about alembic, had too many confusions before the video. Thanks
@TheDevWorldbySergioLema
8 ай бұрын
So glad it helped you!
Sergio, very nice on best practices! Congrats! How about integration with environment variables with .env and ci/cd pipeline (staging / production) for the next episode?
@TheDevWorldbySergioLema
Жыл бұрын
Thanks! Yes, it could be nice to see how a Flask application can be integrated in a CI/CD platform.
Why people use flask migrate and not alembic directly with --autogenerate?
@TheDevWorldbySergioLema
Жыл бұрын
😂 Don't know
thanks bro!
@TheDevWorldbySergioLema
4 ай бұрын
Glad you liked it!
I thought this video was well presented and paced. One small thing - you have a pretty intense gaze; I’d probably do something to lessen the impact of that on your videos.
@TheDevWorldbySergioLema
Жыл бұрын
😅 Yes, more people already told me that. I try to correct that on my current videos.
@evapardeza1647
Жыл бұрын
@@TheDevWorldbySergioLema That could be addressed blinking more often ;) Nice job!
@TheDevWorldbySergioLema
Жыл бұрын
🤣🤣🤣 You're right