Skip to content

Commit

Permalink
chore: rename llmpa.models to llmpa schemas (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuffin authored Oct 19, 2024
1 parent 3e27bfc commit f528a8d
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from alembic import context

from db import db, init_models
from db import db, init_schemas

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
Expand All @@ -26,7 +26,7 @@


## to init db.metadata
init_models()
init_schemas()

# add your model's MetaData object here
# for 'autogenerate' support
Expand Down
6 changes: 3 additions & 3 deletions llmpa/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
async_session = sessionmaker(async_engine, class_=AsyncSession, expire_on_commit=False)


def init_models():
from models import File, User
def init_schemas():
from schemas import File, User

__models = [File, User]


def init_db(app: Flask):
global async_engine, async_session

init_models()
init_schemas()

db.init_app(app)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion llmpa/tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from app import create_app
from db import db, async_session
from models import User
from schemas import User


class TestUserModel(unittest.IsolatedAsyncioTestCase):
Expand Down

0 comments on commit f528a8d

Please sign in to comment.