[Sqlalchemy-tickets] [sqlalchemy] #2842: The recipe "Storing/Using Enumerations" does not function
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-10-16 08:09:20
|
#2842: The recipe "Storing/Using Enumerations" does not function in SQLite
-------------------------+-----------------------------------------
Reporter: rgg | Owner: zzzeek
Type: enhancement | Status: new
Priority: low | Milestone:
Component: utils | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
The recipe "Storing/Using Enumerations", described in
http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/ does not function
in SQLite using the latest SQLAlchemy version (from the repository).
It fails when it tries to create the CHECK constraint associated to the
Enum field. The constraint receives the values associated to the enum
symbols, but requires the symbols, and it fails when trying to get the
values of the symbols.
In PostgreSQL (which uses a native ENUM type) the recipe works ok.
I suppose it will fail in all databases which don't have a native Enum
type, but I have verified the failure only on SQLite.
Regards,
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2842>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|