From ceba819ca753712f9a99fa85740c8b675d163f44 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 18 Dec 2021 01:49:17 +0100 Subject: [PATCH] fix(db): User.userid should be unique --- flaschengeist/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaschengeist/models/user.py b/flaschengeist/models/user.py index d2eea8f..2ce1716 100644 --- a/flaschengeist/models/user.py +++ b/flaschengeist/models/user.py @@ -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)