Skip to content

Commit 2a67a1a

Browse files
psincraianclaude
andcommitted
feat: add email column to customer_seats table
Add email column to store the seat member's email directly on the seat. This supports the member_model_enabled feature where seats reference billing customers rather than individual seat member customers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 4034c55 commit 2a67a1a

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""add_email_to_customer_seats
2+
3+
Revision ID: 8a7b9c0d1e2f
4+
Revises: daafaba9088a
5+
Create Date: 2026-01-08 09:20:32.000000
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
12+
# Polar Custom Imports
13+
14+
# revision identifiers, used by Alembic.
15+
revision = "8a7b9c0d1e2f"
16+
down_revision = "daafaba9088a"
17+
branch_labels: tuple[str] | None = None
18+
depends_on: tuple[str] | None = None
19+
20+
21+
def upgrade() -> None:
22+
op.add_column(
23+
"customer_seats", sa.Column("email", sa.String(length=320), nullable=True)
24+
)
25+
26+
27+
def downgrade() -> None:
28+
op.drop_column("customer_seats", "email")

server/polar/models/customer_seat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ class CustomerSeat(RecordModel):
8484
index=True,
8585
)
8686

87+
email: Mapped[str | None] = mapped_column(
88+
String(320), nullable=True, default=None
89+
)
90+
8791
invitation_token: Mapped[str | None] = mapped_column(
8892
String, nullable=True, default=None, index=True
8993
)

0 commit comments

Comments
 (0)