diff --git a/starlette/middleware/database.py b/starlette/middleware/database.py index b08a2b9c..4f0c3de4 100644 --- a/starlette/middleware/database.py +++ b/starlette/middleware/database.py @@ -27,7 +27,7 @@ class DatabaseMiddleware: def get_backend(self, database_url: typing.Union[str, URL]) -> DatabaseBackend: if isinstance(database_url, str): database_url = URL(database_url) - assert database_url.scheme == "postgres" + assert database_url.scheme == "postgresql" from starlette.database.postgres import PostgresBackend return PostgresBackend(database_url)