Compare commits

..

2 Commits

Author SHA1 Message Date
Tim Van Baak fc28718846 Allow authorless posts 2021-05-01 13:08:27 -07:00
Tim Van Baak 73263bed7d Add column to track which posts have been seen 2021-05-01 13:08:02 -07:00
1 changed files with 6 additions and 1 deletions

View File

@ -223,6 +223,10 @@ class Membership(ModelBase):
# Timestamp the user joined the game
joined = Column(DateTime, nullable=False, server_default=text('CURRENT_TIMESTAMP'))
# Timestamp of the last time the user viewed the post feed
# This is NULL if the player has never viewed posts
last_post_seen = Column(DateTime, nullable=True)
###################
# Player settings #
###################
@ -557,7 +561,8 @@ class Post(ModelBase):
lexicon_id = Column(Integer, ForeignKey('lexicon.id'), nullable=False)
# The user who made the post
user_id = Column(Integer, ForeignKey('user.id'), nullable=False)
# This may be NULL if the post was made by Amanuensis
user_id = Column(Integer, ForeignKey('user.id'), nullable=True)
################
# Post content #