问题 I have a db models like this: class Payment(db.Model): id = db.Column(db.Integer(), primary_key=True) user_id = db.Column(db.Integer(), db.ForeignKey('user.id')) ticket_status = db.Column(db.Enum(TicketStatus, name='ticket_status', default=TicketStatus.UNUSED)) departure_time = db.Column(db.Date) I want to change the value from all ticket_status after datetime.utcnow() passed the date value from departure_time . I tried to code like this: class TicketStatus(enum.Enum): UNUSED = 'UNUSED' USED