feat(l1): add L1 columns + extend account_role CHECK constraint
Adds users.can_cover_l1, accounts.l1_seats_purchased, subscriptions.l1_seat_limit, audit_logs.acting_as. Rotates the users.account_role CHECK constraint to include 'l1_tech' (was: 'owner', 'admin', 'engineer', 'viewer'). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,11 @@ class Account(Base):
|
||||
team_size_bucket: Mapped[Optional[str]] = mapped_column(String(20), nullable=True)
|
||||
primary_psa: Mapped[Optional[str]] = mapped_column(String(20), nullable=True)
|
||||
|
||||
# L1 workspace seats
|
||||
l1_seats_purchased: Mapped[int] = mapped_column(
|
||||
Integer, nullable=False, server_default="0"
|
||||
)
|
||||
|
||||
# SSO / SAML groundwork (Task 11)
|
||||
sso_enabled: Mapped[bool] = mapped_column(Boolean, default=False, server_default="false")
|
||||
sso_provider: Mapped[Optional[str]] = mapped_column(String(20), nullable=True) # "saml" | "oidc"
|
||||
|
||||
Reference in New Issue
Block a user