python - 使用Flask-Migrate实现数据库迁移,出现KeyError?
天蓬老师
天蓬老师 2017-04-18 10:00:14
0
1
699

我是参照flask web开发这本书,数据库为sqlite,说到flask-migrate,我在用命令 python hello.py db migrate -m “initial migration”创建数据库迁移脚本时报以下错误:


显示了keyerror:'migrate',这个报错显示是什么意思呢?该如何解决?在网上也没找到这种信息.

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
黄舟

I also encountered a problem like yours. Later I found out that miagrates was instantiated without adding db:
migrate = Migrate(app, db)
This way it’s ok

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!