Convert role column to a new table
This commit is contained in:
parent
f377b4ce45
commit
7661088814
4 changed files with 54 additions and 2 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
Reference in a new issue