我是靠谱客的博主 忧郁流沙,这篇文章主要介绍flask 数据库迁移 could not assemble any primary key columns for mapped table在进行flsak项目迁移时,现在分享给大家,希望可以做个参考。

flsak + could not assemble any primary key columns for mapped table

  • 在进行flsak项目迁移时

在进行flsak项目迁移时

sqlalchemy.exc.ArgumentError: Mapper Mapper|TenHum|表名could not assemble any primary key columns for mapped table '表名'
刚看到这报错时,一脸懵逼,仔细看了下,好像说时关于主键有问题,
但网上找了好多都没有,最后在stackoverflow 上找到了答案,出现这问题的原因大致是,在定义数据库模型类的字段时,两个字段之间多了个逗号,
https://stackoverflow.com/questions/24872541/could-not-assemble-any-primary-key-columns-for-mapped-table
在这里插入图片描述

最后

以上就是忧郁流沙最近收集整理的关于flask 数据库迁移 could not assemble any primary key columns for mapped table在进行flsak项目迁移时的全部内容,更多相关flask内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(53)

评论列表共有 0 条评论

立即
投稿
返回
顶部