在我的应用程序中,我使用 flask-script 和 flask-migrate 进行数据库迁移,一切都在本地工作。什么时候,我跑
heroku run python manage.py db init
它创建此输出:
Running python manage.py db init on ⬢ fpds-scheduler... up, run.1290 (Free)
Creating directory /app/migrations ... done
Creating directory /app/migrations/versions ... done
Generating /app/migrations/README ... done
Generating /app/migrations/script.py.mako ... done
Generating /app/migrations/alembic.ini ... done
Generating /app/migrations/env.py ... done
Please edit configuration/connection/logging settings in '/app/migrations/alembic.ini' before
proceeding.
但是当我运行时heroku run python manage.py db migrate
出现错误
alembic.util.exc.CommandError: Path doesn't exist: 'migrations'. Please use the 'init' command to create a new scripts folder.
当我运行heroku run bash
并查看我的目录时,我可以看到没有migrations
文件夹......
我试过运行给出命令--app fpds-scheduler
,但这似乎也不起作用。
我不确定出了什么问题?