diff --git a/amt/migrations/env.py b/amt/migrations/env.py index 9f4b92b0..787d3f7c 100644 --- a/amt/migrations/env.py +++ b/amt/migrations/env.py @@ -20,12 +20,14 @@ def get_url() -> str: scheme = os.getenv("APP_DATABASE_SCHEME", "sqlite") - driver = os.getenv("APP_DATABASE_DRIVER", "aiosqlite") if scheme == "sqlite": + driver = os.getenv("APP_DATABASE_DRIVER", "aiosqlite") file = os.getenv("APP_DATABASE_FILE", "database.sqlite3") return f"{scheme}+{driver}:///{file}" + driver = os.getenv("APP_DATABASE_DRIVER", "asyncpg") + user = os.getenv("APP_DATABASE_USER", "amt") password = os.getenv("APP_DATABASE_PASSWORD", "") server = os.getenv("APP_DATABASE_SERVER", "db")