We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf37df9 commit 751e217Copy full SHA for 751e217
1 file changed
src/api.py
@@ -21,6 +21,7 @@
21
from db_config import (
22
check_db_connection,
23
create_db_and_tables,
24
+ create_audit_ddl,
25
DbContextManager,
26
get_db,
27
)
@@ -66,6 +67,8 @@ async def lifespan(application: FastAPI): # pylint: disable=unused-argument
66
67
"""Executa as rotinas de inicialização da API."""
68
try:
69
await create_db_and_tables()
70
+ if not TEST_ENVIRONMENT:
71
+ await create_audit_ddl()
72
await crud_auth.init_user_admin()
73
except OperationalError as exception:
74
logger.error("A inicialização do banco de dados falhou: %s", exception)
0 commit comments