I have a MySQL VARCHAR column, but I'd like to get ENUM-like behavior at the ORM level. I'm using the declarative style. Here's what I've got so far:
language = Column(Enum('en', 'fr', native_enum=False), CheckConstraint(), default='en') Docs say that when native_enum is set to False, uses VARCHAR + check constraint for all backends. What args do I need to pass to CheckConstraint in order to restrict the list of languages? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/9upUrF4h5-QJ. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.