From 1847403254bf1d8b5202948c97d07d1e3f1d7aec Mon Sep 17 00:00:00 2001 From: sudacode Date: Fri, 6 Sep 2024 02:55:10 -0700 Subject: [PATCH] remove creation_date column --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index f9d66d4..94512db 100755 --- a/server.py +++ b/server.py @@ -56,7 +56,6 @@ class WatchHistory(Base): channel_url = Column(String(255), nullable=False) channel_name = Column(String(255), nullable=False) watch_date = Column(DateTime, nullable=False, server_default=func.now()) - creation_date = Column(Date, nullable=False, server_default=func.current_date()) created_by = Column( String(100), nullable=False, server_default="mpv-youtube-queue-server" ) @@ -109,7 +108,9 @@ def add_video(): ) session.add(new_entry) 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 except exc.SQLAlchemyError as e: session.rollback()