mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Added Discord ID column
This commit is contained in:
parent
7c1195e1dd
commit
34b1faae33
1 changed files with 5 additions and 2 deletions
|
@ -25,6 +25,7 @@ class User(Base):
|
||||||
password = Column(String, nullable=False)
|
password = Column(String, nullable=False)
|
||||||
royal = Column(Boolean, nullable=False)
|
royal = Column(Boolean, nullable=False)
|
||||||
telegram_id = Column(Integer, unique=True)
|
telegram_id = Column(Integer, unique=True)
|
||||||
|
discord_id = Column(Integer, unique=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.username
|
return self.username
|
||||||
|
@ -114,5 +115,7 @@ def init_royal_db():
|
||||||
create_user("voltaggio", "ventitre", True)
|
create_user("voltaggio", "ventitre", True)
|
||||||
create_user("doc", "ventiquattro", True)
|
create_user("doc", "ventiquattro", True)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
with Session() as session:
|
||||||
|
# Generate the database if it's empty
|
||||||
|
if session.query(User).first() is None:
|
||||||
init_royal_db()
|
init_royal_db()
|
Loading…
Reference in a new issue