From: Marcel van der Veldt Date: Sat, 13 Dec 2025 12:03:08 +0000 (+0100) Subject: Some cleanup X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=675afac9156b5ac9c941d7b0e34b5a00365aca10;p=music-assistant-server.git Some cleanup --- diff --git a/music_assistant/controllers/webserver/auth.py b/music_assistant/controllers/webserver/auth.py index 4a1b5e69..9a926d94 100644 --- a/music_assistant/controllers/webserver/auth.py +++ b/music_assistant/controllers/webserver/auth.py @@ -121,7 +121,7 @@ class AuthenticationManager: if db_row := await self.database.get_row("settings", {"key": "schema_version"}): prev_version = int(db_row["value"]) else: - prev_version = 0 + prev_version = DB_SCHEMA_VERSION except (KeyError, ValueError, Exception): # settings table doesn't exist yet or other error prev_version = 0 @@ -157,8 +157,7 @@ class AuthenticationManager: ) """ ) - - # Users table (decoupled from auth providers) + # Users table await self.database.execute( """ CREATE TABLE IF NOT EXISTS users ( @@ -175,7 +174,6 @@ class AuthenticationManager: ) """ ) - # User auth provider links (many-to-many) await self.database.execute( """ @@ -190,7 +188,6 @@ class AuthenticationManager: ) """ ) - # Auth tokens table await self.database.execute( """ @@ -207,7 +204,6 @@ class AuthenticationManager: ) """ ) - await self.database.commit() async def _create_database_indexes(self) -> None: