BaseCRUD model

This commit is contained in:
2023-05-15 21:14:06 +03:00
parent 02b8e86ccf
commit ffbc6bf88b
4 changed files with 105 additions and 51 deletions

View File

@@ -9,7 +9,9 @@ from sqlalchemy.ext.asyncio import AsyncEngine
from alembic import context
from app.settings import settings
import users
from app.database import db
# your models to import for migrations processing
from users.models import *
# this is the Alembic Config object, which provides
@@ -27,7 +29,7 @@ config.set_main_option('sqlalchemy.url', settings.DATABASE_URL)
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = [users.models.Base.metadata]
target_metadata = db.Base.metadata
# other values from the config, defined by the needs of env.py,
# can be acquired: