Convert role column to a new table

This commit is contained in:
Luka Radenovic 2022-04-13 15:11:51 +02:00
parent f377b4ce45
commit 7661088814
4 changed files with 54 additions and 2 deletions

View file

@ -23,7 +23,7 @@ class AppRole(db.Model):
user_id = db.Column(String(length=64), primary_key=True)
app_id = db.Column(Integer, ForeignKey("app.id"), primary_key=True)
role = db.Column(String(length=64))
role_id = db.Column(Integer, ForeignKey("role.id"))
def __repr__(self):
return f"{self.role} for {self.user_id} on {self.app_id}"