Skip to content

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog committed Oct 29, 2024
1 parent d3b51d4 commit 24936b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion amt/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 24936b2

Please sign in to comment.