Sqlalchemy type enumeration / mapping?
1 answer
SQLAlchemy 0.6 has a generic Enum
column type , earlier versions have vendor specific types for some database drivers. And of course you can use Integer
.
Initializing the various classes based on the column value is straightforward. What you need for this particular case: unidirectional table inheritance .
+1
a source to share