From abf01da28632a9f092829b5b4bb88b683f091c49 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 30 Oct 2022 22:49:35 +0100 Subject: [PATCH] MediaElement: Add indeces to watched & ignored & compositum of both --- server/entertainment_decider/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/entertainment_decider/models.py b/server/entertainment_decider/models.py index 3cd1dbf..50cbd34 100644 --- a/server/entertainment_decider/models.py +++ b/server/entertainment_decider/models.py @@ -461,12 +461,15 @@ class MediaElement(db.Entity, Tagable): bool, column="watched", default=False, + index=False, # does not need index because of composite index below ) ignored: bool = orm.Required( bool, column="ignored", default=False, + index=True, ) + orm.composite_index(watched, ignored) progress: int = orm.Required( int, default=0,