Dropping SQLite Columns Using Flask-Migrate

preview_player
Показать описание
This video demonstrates how to remove columns in SQLite using batch operations in Alembic for database migrations.

Build Better Apps, Faster In Only 4 Minutes👇🏼
Рекомендации по теме
Комментарии
Автор

I've read all the documents you link to and threads on both GitHub and StackOverflow, but I couldn't quite understand what needs doing until I watched your video. It all makes sense now, thank you very much!

pfabri
Автор

Thank you for explanation, it was very helpful. I used you video to modify foreign key.

gurkin
Автор

Amazing video! Explains everything very well so that it makes perfect sense. Kudos mate!

Destroyergm
Автор

6:24 from olembic import op
7:42

with op.batch_alter_table('test') as batch_op:

simIsPlayingGames
Автор

Thank you, Anthony!! Helpful (as always)

guillaumesimler
Автор

Thank you too much, it was really helpful for me

ВадимМещеряков-шз
Автор

I was stumped by this issue, and your video helped me solve it. Thanks very much. Btw do you still offer coaching on projects, I didn't see anything like this on your website

aofadero
Автор

you need to make more videos like these especially on flask

illyushen
Автор

I pondered upon this question some weeks ago, and hoped to find a solution or a workaround. Didn't work


is there a similar solution for adding foreign keys or removing the constraints that these impose?

I tried 'batch_create_foreign_key', but it throws other errors and for now I took the risk of adding columns without the constraints.

Any help would be much appreciated.!

vaneakatok
Автор

And after flask db upgarde

I'm getting drop down column error and I get named other database table which was created by past program

vamsisrinivas
Автор

I had same issue and plus I'm getting error like after giving command like flask db migrate -m"msg" I'm getting that the data base is not up to date


How can I update

vamsisrinivas
Автор

Hi Anthony, can dropping columns be set in the migrations env.py file to save having to edit the migration files, seen a post on SO about it, i've heard that the migration files should not be touched. Or would it be better to use postgres instead of sqlite. Thanks.

lardosian
Автор

Hi, Anthony! I sent u email. Answer me please.

ArtyomShakurov