From 2154684751774fe24d651a6ffbfcd9ed7f073514 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 8 Jul 2023 02:19:37 +0300 Subject: [PATCH] remove now-unnecessary app_id column --- files/classes/votes.py | 2 -- files/routes/votes.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/files/classes/votes.py b/files/classes/votes.py index b08c9d7b0..3807461c7 100644 --- a/files/classes/votes.py +++ b/files/classes/votes.py @@ -13,7 +13,6 @@ class Vote(Base): post_id = Column(Integer, ForeignKey("posts.id"), primary_key=True) user_id = Column(Integer, ForeignKey("users.id"), primary_key=True) vote_type = Column(Integer) - app_id = Column(Integer, ForeignKey("oauth_apps.id")) real = Column(Boolean, default=True) coins = Column(Integer, default=1, nullable=False) created_utc = Column(Integer) @@ -44,7 +43,6 @@ class CommentVote(Base): comment_id = Column(Integer, ForeignKey("comments.id"), primary_key=True) user_id = Column(Integer, ForeignKey("users.id"), primary_key=True) vote_type = Column(Integer) - app_id = Column(Integer, ForeignKey("oauth_apps.id")) real = Column(Boolean, default=True) coins = Column(Integer, default=1, nullable=False) created_utc = Column(Integer) diff --git a/files/routes/votes.py b/files/routes/votes.py index 014a07d70..2a4cb4fe2 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -125,7 +125,6 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): vote = Vote(user_id=v.id, vote_type=new, post_id=target_id, - app_id=v.client.application.id if v.client else None, real=real, coins=coin_value ) @@ -133,7 +132,6 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): vote = CommentVote(user_id=v.id, vote_type=new, comment_id=target_id, - app_id=v.client.application.id if v.client else None, real=real, coins=coin_value )