public.member_billing
Synced from
docs/generated/erd/— do not hand-edit.
Regenerate withbun run docs:erd(needs staging reader), then this script runs automatically.
Labels:docs/db/erd-table-labels.yml· Runbook:docs/runbooks/erd-schema-docs.md
Description
Section titled “Description”Member billing satellite — Not: commerce_entitlements / plan limits ledger
Columns
Section titled “Columns”| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| auto_renew | boolean | false | true | |||
| created_at | timestamp with time zone | now() | true | |||
| member_id | uuid | false | public.members | |||
| seat_type | text | ‘primary’::text | true | |||
| self_paid | boolean | false | true | |||
| stripe_customer_id | text | true | ||||
| updated_at | timestamp with time zone | now() | true |
Viewpoints
Section titled “Viewpoints”| Name | Definition |
|---|---|
| Membership & Billing | Members split-payload (members + member_profiles + member_billing + member_metrics), tiers, commerce/billable offers, billing agreements/subscriptions/transactions. Catalog §2.1–2.2, 2.4. Strong first-review cluster for Nathan/Craig. NAMING TRAP — “entitlement” is three different concepts (see docs/db/erd-table-labels.yml): commerce_entitlements = plan/agreement commercial limits; member_entitlements = chamber member benefit allocations; member_product_entitlements = external product provisioning (e.g. Bullseye). The bare entitlements table is NOT the commerce ledger (ADR #2581). |
Constraints
Section titled “Constraints”| Name | Type | Definition |
|---|---|---|
| member_billing_member_id_fkey | FOREIGN KEY | FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE CASCADE |
| member_billing_pkey | PRIMARY KEY | PRIMARY KEY (member_id) |
Indexes
Section titled “Indexes”| Name | Definition |
|---|---|
| idx_member_billing_stripe | CREATE UNIQUE INDEX idx_member_billing_stripe ON public.member_billing USING btree (stripe_customer_id) WHERE (stripe_customer_id IS NOT NULL) |
| member_billing_pkey | CREATE UNIQUE INDEX member_billing_pkey ON public.member_billing USING btree (member_id) |
Triggers
Section titled “Triggers”| Name | Definition |
|---|---|
| set_updated_at_member_billing | CREATE TRIGGER set_updated_at_member_billing BEFORE UPDATE ON public.member_billing FOR EACH ROW EXECUTE FUNCTION update_updated_at_column() |
Relations
Section titled “Relations”erDiagram
"public.member_billing" |o--|| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE CASCADE"
"public.member_billing" {
uuid member_id FK ""
}
"public.members" {
uuid company_id FK ""
uuid contact_id FK ""
uuid id ""
text org_id FK ""
}
Generated by tbls

