mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Create new logintoken table
This commit is contained in:
parent
3f47208bc5
commit
e08d2ec957
1 changed files with 10 additions and 0 deletions
10
db.py
10
db.py
|
@ -831,6 +831,16 @@ class ParsedRedditPost(Base):
|
|||
author_username = Column(String)
|
||||
|
||||
|
||||
class LoginToken(Base):
|
||||
__tablename__ = "logintoken"
|
||||
|
||||
royal_id = Column(Integer, ForeignKey("royals.id"))
|
||||
royal = relationship("Royal", backref="tokens", lazy="joined")
|
||||
|
||||
token = Column(String, primary_key=True)
|
||||
expiration = Column(DateTime, nullable=False)
|
||||
|
||||
|
||||
# If run as script, create all the tables in the db
|
||||
if __name__ == "__main__":
|
||||
print("Creating new tables...")
|
||||
|
|
Loading…
Reference in a new issue