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

  • @ricardosuarezdelvalle4281
    @ricardosuarezdelvalle4281 Жыл бұрын

    This is how a guy looks after dealing with alembic, you can see it in his eyes

  • @TheDevWorldbySergioLema

    @TheDevWorldbySergioLema

    Жыл бұрын

    🤣

  • @gerardokolie1829

    @gerardokolie1829

    8 ай бұрын

    😂😂

  • @jitvimol
    @jitvimol16 күн бұрын

    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

    @TheDevWorldbySergioLema

    13 күн бұрын

    You're right. The content files shouldn't be edited. It will cause Alembic checksum errors

  • @racheljeanquinn7872
    @racheljeanquinn7872 Жыл бұрын

    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

    @TheDevWorldbySergioLema

    Жыл бұрын

    So glad it helped you!

  • @DeepakVerma-ec1fg
    @DeepakVerma-ec1fg8 ай бұрын

    nice video. learnt about alembic, had too many confusions before the video. Thanks

  • @TheDevWorldbySergioLema

    @TheDevWorldbySergioLema

    8 ай бұрын

    So glad it helped you!

  • @fbrcode
    @fbrcode Жыл бұрын

    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

    @TheDevWorldbySergioLema

    Жыл бұрын

    Thanks! Yes, it could be nice to see how a Flask application can be integrated in a CI/CD platform.

  • @yomajo
    @yomajo Жыл бұрын

    Why people use flask migrate and not alembic directly with --autogenerate?

  • @TheDevWorldbySergioLema

    @TheDevWorldbySergioLema

    Жыл бұрын

    😂 Don't know

  • @ivanabregu1
    @ivanabregu14 ай бұрын

    thanks bro!

  • @TheDevWorldbySergioLema

    @TheDevWorldbySergioLema

    4 ай бұрын

    Glad you liked it!

  • @sageinquisitor
    @sageinquisitor Жыл бұрын

    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

    @TheDevWorldbySergioLema

    Жыл бұрын

    😅 Yes, more people already told me that. I try to correct that on my current videos.

  • @evapardeza1647

    @evapardeza1647

    Жыл бұрын

    @@TheDevWorldbySergioLema That could be addressed blinking more often ;) Nice job!

  • @TheDevWorldbySergioLema

    @TheDevWorldbySergioLema

    Жыл бұрын

    🤣🤣🤣 You're right

Келесі