app.subscriptions
TableRow level security on
Present only when an organization uses Atlas (Section 4.8.1). At most one subscription per org is not canceled.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Subscription id. |
| org_id | uuid | No | Subscribing organization.References app.organizations.id |
| plan_code | text | No | Current plan.References app.plans.code |
| subscription_state | app.subscription_state | No | Lifecycle state, changed only by private.transition_subscription. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| extra_seats | integer | No | Seats bought above the plan's seat allowance: the quantity of the plan's extra-seat price on the Stripe subscription. Set only by app.sync_subscription_from_stripe (ADR 0035). |
| seats_grandfathered | boolean | No | True for a paid subscription that existed before plans had seat limits (pricing v4): it keeps unlimited seats until its plan changes or it ends (ADR 0035). |
| trial_ends_at | timestamp with time zone | Yes | When the trial of this subscription ends (Section 14.7): set while it is trialing and kept as history after it converts or moves to Access. Written only by private.start_trial. |