Форматирование кода, добавление лого, исправление тестов, улучшение эндпоинтов и документации

This commit is contained in:
2025-11-30 20:03:39 +03:00
parent a3ccd8a466
commit 99de648fa9
38 changed files with 1261 additions and 308 deletions

View File

@@ -6,6 +6,7 @@ from sqlalchemy import pool
from sqlmodel import SQLModel
from library_service.settings import POSTGRES_DATABASE_URL
print(POSTGRES_DATABASE_URL)
# this is the Alembic Config object, which provides
@@ -21,6 +22,7 @@ if config.config_file_name is not None:
# add your model's MetaData object here
# for 'autogenerate' support
from library_service.models.db import *
target_metadata = SQLModel.metadata
# other values from the config, defined by the needs of env.py,
@@ -67,9 +69,7 @@ def run_migrations_online() -> None:
)
with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata
)
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations()