Skip to content

Commit e67fc93

Browse files
committed
Update mirgations env with new layout
This also updates isort config to tell it that alembic is a 3rd party dep.
1 parent 3e9e34c commit e67fc93

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

migrations/env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from sqlalchemy.ext.asyncio.engine import AsyncConnection
88

99
# This is a required step by Alembic to properly generate migrations
10-
from api import database
10+
from api.models.orm import base
1111
from api.settings import ConnectionURLs
1212

13-
target_metadata = database.Base.metadata
13+
target_metadata = base.Base.metadata
1414

1515
# this is the Alembic Config object, which provides
1616
# access to the values within the .ini file in use.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ webserver = "uvicorn api.main:app"
5555
[tool.isort]
5656
profile = "black"
5757
line_length = 120
58+
known_third_party = "alembic"
5859

5960
[tool.black]
6061
line-length = 120

0 commit comments

Comments
 (0)