flask 数据库迁移 could not assemble any primary key columns for mapped table

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_第1张图片

你可能感兴趣的:(python,Flask,解决Bug)