fix inverted alembic file check

This commit is contained in:
Khaleel Al-Adhami 2024-10-24 12:51:51 -07:00
parent 9d29e7f3ee
commit 9e35f3c097

View File

@ -38,7 +38,7 @@ def get_engine(url: str | None = None) -> sqlalchemy.engine.Engine:
url = url or conf.db_url
if url is None:
raise ValueError("No database url configured")
if environment.ALEMBIC_CONFIG.exists():
if not environment.ALEMBIC_CONFIG.exists():
console.warn(
"Database is not initialized, run [bold]reflex db init[/bold] first."
)