Hello and thank you for a great library! This is definitely a modern library and it brings me a lot of joy.
But I have a question or maybe a proposition. When we're working with Django and run tests it creates Database from scratch and also applies migrations every time, so we can check if migrations are actually working before deploying.
Also when we're working with SQLModel/SQLAlchemy we recreated manually this behavior with fixtures, so we could test migrations as well.
But with pglite it seems impossible currently, because there is always on table creation from metadata:
# Create session - prefer SQLModel if available
if HAS_SQLMODEL and SQLModelSession is not None:
session = SQLModelSession(pglite_engine)
# Create tables if using SQLModel with retry logic
if SQLModel is not None:
for attempt in range(3):
try:
SQLModel.metadata.create_all(pglite_engine)
So, would it make sense to move this functionality to separate function/fixture or maybe add some pytest flag to disable this behavior?
Hello and thank you for a great library! This is definitely a modern library and it brings me a lot of joy.
But I have a question or maybe a proposition. When we're working with Django and run tests it creates Database from scratch and also applies migrations every time, so we can check if migrations are actually working before deploying.
Also when we're working with SQLModel/SQLAlchemy we recreated manually this behavior with fixtures, so we could test migrations as well.
But with pglite it seems impossible currently, because there is always on table creation from metadata:
So, would it make sense to move this functionality to separate function/fixture or maybe add some pytest flag to disable this behavior?