fix(db): User.userid should be unique

This commit is contained in:
Ferdinand Thiessen 2021-12-18 01:49:17 +01:00
parent a3ccd6cea1
commit ceba819ca7
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class User(db.Model, ModelSerializeMixin):
"""
__tablename__ = "user"
userid: str = db.Column(db.String(30), nullable=False)
userid: str = db.Column(db.String(30), unique=True, nullable=False)
display_name: str = db.Column(db.String(30))
firstname: str = db.Column(db.String(50), nullable=False)
lastname: str = db.Column(db.String(50), nullable=False)