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