While testing my Flask applications functionality i somehow broke my db by editing my models during up/downgrading. I am using Migrate for this purpose but i am fairly new to it. which leads to my question: How do I completely reset my db(Migrate revisions). Before when something like this happened i would just downgrade to init state and manually delete all python files from Migrate/versions folder.
Asked
Active
Viewed 87 times
1 Answers
0
Found a solution:
- just delete whole migrations folder
- do flask db init
- check if migrations folder was created(check all necessary files from screenshot) Screenshot of necessary files in migrations folder
4. flask db migrate 5. flask db upgrade Now you have an db matching the models from your application

EasY
- 1