forked from MarseyWorld/MarseyWorld
drop unused columns from WPD
parent
dd263f525e
commit
b4cae596ae
|
@ -188,7 +188,6 @@ class Comment(Base):
|
|||
level = Column(Integer, default=1)
|
||||
parent_comment_id = Column(Integer, ForeignKey("comments.id"))
|
||||
top_comment_id = Column(Integer)
|
||||
nsfw = Column(Boolean, default=False)
|
||||
is_bot = Column(Boolean, default=False)
|
||||
stickied = Column(String)
|
||||
stickied_utc = Column(Integer)
|
||||
|
@ -212,6 +211,11 @@ class Comment(Base):
|
|||
queened = Column(Boolean, default=False)
|
||||
sharpened = Column(Boolean, default=False)
|
||||
|
||||
if FEATURES['NSFW_MARKING']:
|
||||
nsfw = Column(Boolean, default=False)
|
||||
else:
|
||||
nsfw = False
|
||||
|
||||
oauth_app = relationship("OauthApp")
|
||||
post = relationship("Post", back_populates="comments")
|
||||
author = relationship("User", primaryjoin="User.id==Comment.author_id")
|
||||
|
|
|
@ -47,7 +47,6 @@ class Post(Base):
|
|||
private = Column(Boolean, default=False)
|
||||
comment_count = Column(Integer, default=0)
|
||||
is_approved = Column(Integer, ForeignKey("users.id"))
|
||||
nsfw = Column(Boolean, default=False)
|
||||
is_bot = Column(Boolean, default=False)
|
||||
upvotes = Column(Integer, default=1)
|
||||
downvotes = Column(Integer, default=0)
|
||||
|
@ -70,6 +69,11 @@ class Post(Base):
|
|||
ping_cost = Column(Integer, default=0)
|
||||
bump_utc = Column(Integer)
|
||||
|
||||
if FEATURES['NSFW_MARKING']:
|
||||
nsfw = Column(Boolean, default=False)
|
||||
else:
|
||||
nsfw = False
|
||||
|
||||
author = relationship("User", primaryjoin="Post.author_id==User.id")
|
||||
oauth_app = relationship("OauthApp")
|
||||
approved_by = relationship("User", uselist=False, primaryjoin="Post.is_approved==User.id")
|
||||
|
|
Loading…
Reference in New Issue