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.