From 8b32b71db5a995a68b7ba39a77eaf0406f0f97a2 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Wed, 7 Jan 2026 22:28:27 -0800 Subject: [PATCH] chore: add debug script --- debug_dmb_deadco.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 debug_dmb_deadco.py diff --git a/debug_dmb_deadco.py b/debug_dmb_deadco.py new file mode 100644 index 0000000..41d7971 --- /dev/null +++ b/debug_dmb_deadco.py @@ -0,0 +1,22 @@ +from sqlmodel import Session, select +from database import engine +from models import Vertical, Song, Performance + +with Session(engine) as session: + for s in ['dmb', 'dead-and-company']: + v = session.exec(select(Vertical).where(Vertical.slug == s)).first() + print(f"--- {s} ---") + if not v: + print("Vertical missing") + continue + print(f"Vertical ID: {v.id}") + + perfs = session.exec(select(Performance).join(Song).where(Song.vertical_id == v.id)).all() + print(f"Total Perfs: {len(perfs)}") + + song = session.exec(select(Song).where(Song.title == 'All Along the Watchtower', Song.vertical_id == v.id)).first() + if song: + watchtower_perfs = session.exec(select(Performance).where(Performance.song_id == song.id)).all() + print(f"Watchtower: ID={song.id}, Canon={song.canon_id}, Perfs={len(watchtower_perfs)}") + else: + print("Watchtower: Missing")