初学flask,使用python manage.py db upgrade命令创建数据库时报错
Error: Path doesn’t exist: ‘migrations’. Please use the ‘init’ command to create a new scripts folder.
根据报错信息我们确定迁移仓库不存在migrations,需要先创建新的脚本文件夹。
使用python manage.py db init创建迁移仓库
注意:manage.py db需要根据自身创建的py文件进行修改。
再使用python manage.py db upgrade命令创建数据库就可以成功了。
在使用flask创建数据库时报错:Error: Path doesn't exist: 'migrations'.
最新推荐文章于 2022-09-03 17:13:42 发布