InvalidRequestError: Table is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
- 解决方法
添加在导入包后的位置
#models.py #from ..... if __name__ == ‘__main__‘: db.metadata.clear()
- 执行
- 参考链接:https://stackoverflow.com/questions/37908767/table-roles-users-is-already-defined-for-this-metadata-instance
文章来自:https://www.cnblogs.com/edhg/p/8907300.html