问题背景:
通过python使用sqlalchemy,创建相应的表,其中,因为使用ChoiceType,而导致的问题,根本的原因是因为参数写错误:
错误:right_type = Column(ChoiceType(types_choices,INTEGER),nullable=False)
正确:right_type = Column(ChoiceType(types_choices),nullable=False),需要注意INTEGER的参数位置
问题背景:
通过python使用sqlalchemy,创建相应的表,其中,因为使用ChoiceType,而导致的问题,根本的原因是因为参数写错误:
错误:right_type = Column(ChoiceType(types_choices,INTEGER),nullable=False)
正确:right_type = Column(ChoiceType(types_choices),nullable=False),需要注意INTEGER的参数位置