Skip to content

Commit

Permalink
Merge branch 'master' into fix/broken-oauth-okta
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewiscowles1986 authored Dec 20, 2024
2 parents cc41ee6 + 418ab8a commit 88dd415
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flask_appbuilder/security/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Column,
DateTime,
ForeignKey,
Index,
Integer,
Sequence,
String,
Expand Down Expand Up @@ -52,6 +53,8 @@ def __repr__(self):
Column("permission_view_id", Integer, ForeignKey("ab_permission_view.id")),
Column("role_id", Integer, ForeignKey("ab_role.id")),
UniqueConstraint("permission_view_id", "role_id"),
Index("idx_permission_view_id", "permission_view_id"),
Index("idx_role_id", "role_id"),
)


Expand All @@ -72,7 +75,11 @@ def __repr__(self):

class PermissionView(Model):
__tablename__ = "ab_permission_view"
__table_args__ = (UniqueConstraint("permission_id", "view_menu_id"),)
__table_args__ = (
UniqueConstraint("permission_id", "view_menu_id"),
Index("idx_permission_id", "permission_id"),
Index("idx_view_menu_id", "view_menu_id"),
)
id = Column(Integer, Sequence("ab_permission_view_id_seq"), primary_key=True)
permission_id = Column(Integer, ForeignKey("ab_permission.id"))
permission = relationship("Permission", lazy="joined")
Expand Down

0 comments on commit 88dd415

Please sign in to comment.