feat: WatchedArtist.showAllTypes toggle (default false)

Adds the per-artist release-type filter toggle: off (default) restricts
a discography view to core studio releases, on shows everything
(live, compilations, etc.).
This commit is contained in:
Jonathan
2026-07-11 18:03:29 +02:00
parent 28fc1ee1a8
commit f2dbef047c
3 changed files with 14 additions and 0 deletions
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "WatchedArtist" ADD COLUMN "showAllTypes" BOOLEAN NOT NULL DEFAULT false;
+1
View File
@@ -97,6 +97,7 @@ model WatchedArtist {
mbid String @unique
name String
autoMonitorFuture Boolean @default(false)
showAllTypes Boolean @default(false)
monitorFrom DateTime @default(now())
lastPolledAt DateTime?
createdAt DateTime @default(now())
@@ -0,0 +1,11 @@
def test_watched_artist_show_all_types_defaults_false(conn):
with conn.cursor() as cur:
cur.execute(
'INSERT INTO "WatchedArtist" (id, mbid, name, "createdAt") '
"VALUES (gen_random_uuid()::text, 'm1', 'X', now()) RETURNING id"
)
aid = cur.fetchone()[0]
conn.commit()
with conn.cursor() as cur:
cur.execute('SELECT "showAllTypes" FROM "WatchedArtist" WHERE id = %s', (aid,))
assert cur.fetchone()[0] is False