remove creation_date column

This commit is contained in:
sudacode 2024-09-06 02:55:10 -07:00
parent badcee8d7c
commit 1847403254
Signed by: sudacode
SSH Key Fingerprint: SHA256:lT5C2bB398DcX6daCF/gYFNSTK3y+Du3oTGUnYzfTEw

View File

@ -56,7 +56,6 @@ class WatchHistory(Base):
channel_url = Column(String(255), nullable=False) channel_url = Column(String(255), nullable=False)
channel_name = Column(String(255), nullable=False) channel_name = Column(String(255), nullable=False)
watch_date = Column(DateTime, nullable=False, server_default=func.now()) watch_date = Column(DateTime, nullable=False, server_default=func.now())
creation_date = Column(Date, nullable=False, server_default=func.current_date())
created_by = Column( created_by = Column(
String(100), nullable=False, server_default="mpv-youtube-queue-server" String(100), nullable=False, server_default="mpv-youtube-queue-server"
) )
@ -109,7 +108,9 @@ def add_video():
) )
session.add(new_entry) session.add(new_entry)
session.commit() session.commit()
logging.info("Data inserted into database") logging.debug(
f"{video_name} by {channel_name} inserted into the database successfully"
)
return jsonify(message="Data added to mpv queue and database"), 200 return jsonify(message="Data added to mpv queue and database"), 200
except exc.SQLAlchemyError as e: except exc.SQLAlchemyError as e:
session.rollback() session.rollback()