Please is it possible to move my migrations folder into a subfolder and flask updates this change

203 Views Asked by At

I wanted my Flask app to be much clearer so i created subfolders and moved different aspects of my flask app i.e the routes, forms, models into diff python files and made use of the init file

but since i moved everything including the migrate folder into a subfolder, running flask db migrate is giving me errors

i am getting this error everytime i execute this command:

flask db migrate

Error: Path doesn't exist: 'C:\Users\HP\Desktop\Flaskblog2.0\migrations'. Please use the 'init' command to create a new scripts folder.

1

There are 1 best solutions below

0
Miguel Grinberg On

You can pass the -d option with the directory that you use for your migration repository. For example:

flask db migrate -d some_folder/migrations