This commit is contained in:
2026-03-18 17:14:48 +01:00
parent a6d66d19a2
commit eab355ad21

View File

@@ -1,7 +1,7 @@
from logging.config import fileConfig
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from sqlalchemy import pool, create_engine
from alembic import context
from models import Base
@@ -63,11 +63,7 @@ def run_migrations_online() -> None:
and associate a connection with the context.
"""
connectable = engine_from_config(
config.get_section(config.config_ini_section, {}),
prefix="sqlalchemy.",
poolclass=pool.NullPool,
)
connectable = create_engine(os.environ["DATABASE_URL"], poolclass=pool.NullPool)
with connectable.connect() as connection:
context.configure(