feat: Update SoundPlayed model to allow nullable user_id
This commit is contained in:
@@ -120,6 +120,6 @@ def create_app():
|
|||||||
"""Stop services when app context is torn down."""
|
"""Stop services when app context is torn down."""
|
||||||
if exception:
|
if exception:
|
||||||
scheduler_service.stop()
|
scheduler_service.stop()
|
||||||
music_player_service.stop_vlc_instance()
|
# music_player_service.stop_vlc_instance()
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class SoundPlayed(db.Model):
|
|||||||
user_id: Mapped[int] = mapped_column(
|
user_id: Mapped[int] = mapped_column(
|
||||||
Integer,
|
Integer,
|
||||||
ForeignKey("user.id"),
|
ForeignKey("user.id"),
|
||||||
nullable=False,
|
nullable=True,
|
||||||
)
|
)
|
||||||
sound_id: Mapped[int] = mapped_column(
|
sound_id: Mapped[int] = mapped_column(
|
||||||
Integer,
|
Integer,
|
||||||
|
|||||||
Reference in New Issue
Block a user