This commit is contained in:
+1
-4
@@ -160,10 +160,7 @@ class Habit(Base):
|
||||
|
||||
class HabitLog(Base):
|
||||
__tablename__ = "habit_logs"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("habit_id", "day", name="uq_habit_log_day"),
|
||||
Index("ix_habit_logs_habit_day", "habit_id", "day"),
|
||||
)
|
||||
__table_args__ = (UniqueConstraint("habit_id", "day", name="uq_habit_log_day"),)
|
||||
id: Mapped[UUID] = mapped_column(primary_key=True, default=new_id)
|
||||
habit_id: Mapped[UUID] = mapped_column(ForeignKey("habits.id", ondelete="CASCADE"), index=True)
|
||||
day: Mapped[date] = mapped_column(Date)
|
||||
|
||||
Reference in New Issue
Block a user