Reduce to_learn, callable, review into one status field

This commit is contained in:
Ian Keane 2026-06-11 12:55:16 -04:00
parent 507531fbff
commit d1e99c51de
4 changed files with 84 additions and 29 deletions

View file

@ -101,9 +101,7 @@ class TuneByInstrument(db.Model):
learned_from_id = Column(Integer, ForeignKey("musicians.id", ondelete="SET NULL"), nullable=True)
tuning_id = Column(Integer, ForeignKey("tunings.id", ondelete="SET NULL"), nullable=True)
date_learned = Column(Date, nullable=True)
callable = Column(Boolean, nullable=True)
review = Column(Boolean, nullable=True)
to_learn = Column(Boolean, nullable=True, default=False)
status = Column(String, nullable=True)
difficulty = Column(String, nullable=True)
tune = db.relationship("Tune", back_populates="instruments")
@ -123,9 +121,7 @@ class TuneByInstrument(db.Model):
"date_learned": self.date_learned.isoformat() if self.date_learned else None,
"tuning_id": self.tuning_id,
"tuning": self.tuning.name if self.tuning else None,
"callable": self.callable,
"review": self.review,
"to_learn": self.to_learn,
"status": self.status,
"difficulty": self.difficulty,
"notes": [n.to_dict() for n in self.notes],
}