mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Create useless database table
that may become useful at a future time
This commit is contained in:
parent
d118fddf13
commit
2cdb4d3a42
1 changed files with 12 additions and 0 deletions
12
db.py
12
db.py
|
@ -994,6 +994,7 @@ class WikiEntry(Base):
|
|||
|
||||
key = Column(String, primary_key=True)
|
||||
content = Column(Text, nullable=False)
|
||||
locked = Column(Boolean, default=False)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<WikiEntry {self.key}>"
|
||||
|
@ -1014,6 +1015,17 @@ class WikiLog(Base):
|
|||
return f"<WikiLog {self.edit_id}>"
|
||||
|
||||
|
||||
class WikiAuthorization(Base):
|
||||
__tablename__ = "wikiauthorization"
|
||||
|
||||
royal_id = Column(Integer, ForeignKey("royals.id"))
|
||||
royal = relationship("Royal", backref="profile_data", uselist=False, lazy="joined")
|
||||
page_key = Column(String, ForeignKey("wikientries.key"), nullable=False)
|
||||
page = relationship("WikiEntry", backref="edit_logs", lazy="joined")
|
||||
|
||||
__table_args__ = (PrimaryKeyConstraint("royal_id", "page_key"),)
|
||||
|
||||
|
||||
class Event(Base):
|
||||
__tablename__ = "events"
|
||||
|
||||
|
|
Loading…
Reference in a new issue