We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请确认是否是以下情况:
lin-cms-flask项目不推荐/兼容flask-migrate库,不兼容的原因是flask cli中定义的db命令冲突。
Originally posted by @sunlin92 in #152 (comment)
The text was updated successfully, but these errors were encountered:
在生产环境中,我没有使用过Flask-Migrate,而是编写 SQL 脚本和使用可视化数据库管理工具来处理数据库及表的更新改动,个人觉得这样更不容易出错。实现兼容的很简单,app/cli/__init__.py中有相关的绑定指令,修改db_cli = AppGroup("db")即可。
app/cli/__init__.py
db_cli = AppGroup("db")
Sorry, something went wrong.
如果兼容简单,就方便的时候加上吧,谢谢啦!~
是不是可以增加一个命令:flask db update 用来比对模型和数据库表结构,自动增加表的字段、修改字段长度,加个索引?目前用下来,感觉的确是更新数据库不太方便,每次手动写sql语句也挺烦。
No branches or pull requests
lin-cms-flask项目不推荐/兼容flask-migrate库,不兼容的原因是flask cli中定义的db命令冲突。
Originally posted by @sunlin92 in #152 (comment)
The text was updated successfully, but these errors were encountered: