Additional arguments should be named _, got 'ondelete'

错误原因

user_id = Column(Integer, ForeignKey('user.id'), ondelete='CASCADE', nullable=False)

改正后:

user_id = Column(Integer, ForeignKey('user.id', ondelete='CASCADE'), nullable=False)

你可能感兴趣的:(出错)