[Sqlalchemy-tickets] Issue #3125: Enum objects linked to a specific metadata lock up SQLA when atte
Brought to you by:
zzzeek
|
From: Tiemo K. <iss...@bi...> - 2014-07-14 08:00:25
|
New issue 3125: Enum objects linked to a specific metadata lock up SQLA when attempting to create_all on sqlite https://bitbucket.org/zzzeek/sqlalchemy/issue/3125/enum-objects-linked-to-a-specific-metadata Tiemo Kieft: I have a schema that defines some Enum's, running create_all() works fine on Postgres, but on SQLite it locks up. The code below demonstrates the problem: ``` #!python from sqlalchemy import create_engine, Enum from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() e = Enum('foo', 'bar', metadata=Base.metadata) engine = create_engine('sqlite:///:memory:', echo=True) Base.metadata.create_all(bind=engine) ``` Remove the explicit `metadata` kwarg from the Enum constructor solves the problem. I tried running the above code with echo=True, but it doesn't report anything. |