refactor to use pydantic settings and WAL sqlite mode

This commit is contained in:
msramalho
2024-10-18 11:08:51 +01:00
parent 11a8e6f4e0
commit ca7e862855
21 changed files with 246 additions and 135 deletions

View File

@@ -5,10 +5,12 @@ from sqlalchemy import pool
from alembic import context
from shared.settings import Settings
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
config.set_main_option('sqlalchemy.url', os.environ.get("DATABASE_PATH"))
config.set_main_option('sqlalchemy.url', Settings().DATABASE_PATH)
# Interpret the config file for Python logging.
# This line sets up loggers basically.
if config.config_file_name is not None: