projects
/
music-assistant-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcea0cb
)
Add index on timestamp_added (#1381)
author
Melvyn Harbour
<melharbour@gmail.com>
Tue, 18 Jun 2024 14:35:37 +0000
(15:35 +0100)
committer
GitHub
<noreply@github.com>
Tue, 18 Jun 2024 14:35:37 +0000
(16:35 +0200)
music_assistant/server/controllers/music.py
patch
|
blob
|
history
diff --git
a/music_assistant/server/controllers/music.py
b/music_assistant/server/controllers/music.py
index 575fee318fcd32733cac4a2e3520da1477728d65..07db9324b1ab89b3c0dbb94c64ea81746f7276b9 100644
(file)
--- a/
music_assistant/server/controllers/music.py
+++ b/
music_assistant/server/controllers/music.py
@@
-1108,6
+1108,11
@@
class MusicController(CoreController):
await self.database.execute(
f"CREATE INDEX IF NOT EXISTS {db_table}_external_ids_idx on {db_table}(external_ids);" # noqa: E501
)
+ # index on timestamp_added
+ await self.database.execute(
+ f"CREATE INDEX IF NOT EXISTS {db_table}_timestamp_added_idx "
+ f"on {db_table}(timestamp_added);"
+ )
# indexes on provider_mappings table
await self.database.execute(