diff --git a/mealie/alembic/env.py b/mealie/alembic/env.py index bff312261e8..4b38d2830e8 100644 --- a/mealie/alembic/env.py +++ b/mealie/alembic/env.py @@ -1,9 +1,9 @@ from typing import Any import sqlalchemy as sa -from alembic import context import mealie.db.models._all_models # noqa: F401 +from alembic import context from mealie.core.config import get_app_settings from mealie.db.models._model_base import SqlAlchemyBase diff --git a/mealie/db/init_db.py b/mealie/db/init_db.py index 75950a5a299..e3fd4c42817 100644 --- a/mealie/db/init_db.py +++ b/mealie/db/init_db.py @@ -3,11 +3,11 @@ from pathlib import Path from time import sleep +from sqlalchemy import engine, orm, text + from alembic import command, config, script from alembic.config import Config from alembic.runtime import migration -from sqlalchemy import engine, orm, text - from mealie.core import root_logger from mealie.core.config import get_app_settings from mealie.db.db_setup import session_context diff --git a/mealie/services/backups_v2/alchemy_exporter.py b/mealie/services/backups_v2/alchemy_exporter.py index 24fd37544f5..e29d26e2c0e 100644 --- a/mealie/services/backups_v2/alchemy_exporter.py +++ b/mealie/services/backups_v2/alchemy_exporter.py @@ -6,14 +6,14 @@ from textwrap import dedent from typing import Any -from alembic import command -from alembic.config import Config from fastapi.encoders import jsonable_encoder from pydantic import BaseModel from sqlalchemy import Connection, ForeignKey, ForeignKeyConstraint, MetaData, Table, create_engine, insert, text from sqlalchemy.engine import base from sqlalchemy.orm import sessionmaker +from alembic import command +from alembic.config import Config from mealie.db import init_db from mealie.db.fixes.fix_migration_data import fix_migration_data from mealie.db.init_db import ALEMBIC_DIR