- changed status to duplicate
Enum objects linked to a specific metadata lock up SQLA when attempting to create_all on sqlite
Issue #3125
duplicate
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:
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.
Comments (5)
-
repo owner -
repo owner already got it but will see you on the next one! :)
-
reporter Apparently I'm not compatible with the search function, can't even find this issue.
-
repo owner - changed milestone to 0.9.8
-
repo owner - changed milestone to 0.9.7
- Log in to comment
Duplicate of
#3124.