File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ def get_db_url(
5656 if config .database_backend == DatabaseBackend .POSTGRES :
5757 if not config .database_url :
5858 raise ValueError ("DATABASE_URL must be set when using Postgres backend" )
59- logger .info (
60- f"Using Postgres database: { config .database_url .split ('@' )[1 ] if '@' in config .database_url else config .database_url } "
61- )
59+ logger .info (f"Using Postgres database: { config .database_url } " )
6260 return config .database_url
6361
6462 # Default to SQLite
@@ -332,6 +330,9 @@ async def run_migrations(
332330 if app_config .database_backend == DatabaseBackend .POSTGRES :
333331 # Convert asyncpg URL to psycopg2 URL for Alembic
334332 db_url = db_url .replace ("postgresql+asyncpg://" , "postgresql://" )
333+ elif app_config .database_backend == DatabaseBackend .SQLITE :
334+ # Convert aiosqlite URL to pysqlite URL for Alembic
335+ db_url = db_url .replace ("sqlite+aiosqlite://" , "sqlite:///" )
335336
336337 config .set_main_option ("sqlalchemy.url" , db_url )
337338
You can’t perform that action at this time.
0 commit comments