Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flask db init #152

Open
zzheng2020 opened this issue Mar 18, 2021 · 3 comments
Open

flask db init #152

zzheng2020 opened this issue Mar 18, 2021 · 3 comments
Labels
solved issue has been solved

Comments

@zzheng2020
Copy link

flask db init之后出现config = current_app.extensions['migrate'].migrate.get_config(directory, KeyError: 'migrate'
浏览并尝试了网上的一些方法后依然无法解决,希望能够得到帮助:-)

@sunlin92
Copy link
Member

请确认是否是以下情况:

  1. 在全局环境下运行项目,且此前在全局环境安装过flask-migrate
  2. 为lin-cms-flask所在环境手动添加了flask-migrate依赖

lin-cms-flask项目不推荐/兼容flask-migrate库,不兼容的原因是flask cli中定义的db命令冲突。

@sunlin92 sunlin92 reopened this Sep 6, 2021
@sunlin92 sunlin92 added the solved issue has been solved label Dec 9, 2021
@Jokky6
Copy link
Contributor

Jokky6 commented Jul 7, 2022

目前 flask db init,直接 such not command

@zljapan
Copy link

zljapan commented Jan 16, 2023

flask db init 之后,看到
sqlalchemy.exc.DataError: (pymysql.err.DataError) (1366, "Incorrect string value: '\xE8\xB6\x85\xE7\xBA\xA7...' for column 'info' at row 1")

表已经创建了,但是没有数据插入,希望可以得到帮助

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved issue has been solved
Projects
None yet
Development

No branches or pull requests

4 participants