This commit is contained in:
parent
46cf45ad33
commit
8b32b71db5
1 changed files with 22 additions and 0 deletions
22
debug_dmb_deadco.py
Normal file
22
debug_dmb_deadco.py
Normal file
|
|
@ -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")
|
||||||
Loading…
Add table
Reference in a new issue