File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Fastapi-SQLA
22
33[ ![ codecov] ( https://codecov.io/gh/dialoguemd/fastapi-sqla/branch/master/graph/badge.svg?token=BQHLryClIn )] ( https://codecov.io/gh/dialoguemd/fastapi-sqla )
4- [ ![ CircleCI] ( https://circleci.com/gh/dialoguemd/fastapi-sqla.svg?style=svg&circle-token=998482f269270ee521aa54f2accbee2e22943743 )] ( https://circleci.com/gh/dialoguemd/fastapi-sqla )
4+ [ ![ CircleCI] ( https://dl. circleci.com/status-badge/img/ gh/dialoguemd/fastapi-sqla/tree/master .svg?style=svg )] ( https://dl. circleci.com/status-badge/redirect/ gh/dialoguemd/fastapi-sqla/tree/master )
55![ PyPI] ( https://img.shields.io/pypi/v/fastapi-sqla )
66[ ![ Conventional Commits] ( https://img.shields.io/badge/Conventional%20Commits-1.0.0-brightgreen.svg )] ( https://conventionalcommits.org )
77[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
Original file line number Diff line number Diff line change 2323from fastapi_sqla import aws_aurora_support , aws_rds_iam_support
2424
2525try :
26- from sqlalchemy .orm import declarative_base
26+ from sqlalchemy .orm import DeclarativeBase
2727except ImportError :
2828 from sqlalchemy .ext .declarative import declarative_base
2929
30+ DeclarativeBase = declarative_base () # type: ignore
31+
3032
3133logger = structlog .get_logger (__name__ )
3234
@@ -67,7 +69,7 @@ def startup():
6769 logger .info ("startup" , engine = engine )
6870
6971
70- class Base (declarative_base ( cls = DeferredReflection )): # type: ignore
72+ class Base (DeclarativeBase , DeferredReflection ):
7173 __abstract__ = True
7274
7375
You can’t perform that action at this time.
0 commit comments