Answer the question
In order to leave comments, you need to log in
Python how migrations work?
Hello, a small question on migrations, on the principle of their work
Did I understand everything correctly and did it? I work on Flask
I have a database with tables,
I decided to create tables further through migrations
I created a migratyon.py file at the root I
added the code from https://flask-migrate.readthedocs.io/en/latest/
first I did init - it just creates add a folder with migrations
then I do migrate - it creates a version of the migration (as with git commit)
then I do an update - it applies changes to the Base (like git push)
BUT, why when I do all this I delete all other tables created not through migrations?
How to make it so that it does not delete, but only supplements the database with new tables?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question