uow and di basic implementation

This commit is contained in:
2024-03-06 02:28:59 +03:00
parent 402daf63d1
commit 8d93c964e1
21 changed files with 217 additions and 100 deletions

View File

@@ -4,7 +4,6 @@ from alembic import context
from sqlalchemy import engine_from_config, pool
import api.model.user # type: ignore
from api.uow.database import Base
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
@@ -19,7 +18,7 @@ if config.config_file_name is not None:
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = Base.metadata
target_metadata = api.model.user.Base.metadata
# other values from the config, defined by the needs of env.py,
# can be acquired:

View File

@@ -6,7 +6,7 @@ Create Date: 2024-03-04 03:11:36.206211
"""
from typing import Sequence, Union
from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op