Rename the subscription vocabulary to membership #486
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/BUNYIP-488-membership-vocabulary"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BUNYIP-488. Depends on DUNITE-7 for the final state (one line, noted below).
PSA Systems sells a membership, not a subscription. "Subscription" came from the original Stripe-shaped migration, and the partial rename in
20c6c62converted onlymembership_status, sosubscription_tierandsubscription_override_bykept flowing Stripe's noun through the JSON API into the web tier.Migration
One new migration renames the three
userscolumns and the index. Rename rather than recreate: committed migrations are immutable (BUNYIP-293) and the tier string values (lifetime,free,early_adopter,standard) are unchanged, so no data moves and deployed databases survive.Verified by replaying the full migration history against a throwaway postgres 18.2 container: all migrations applied cleanly, and the resulting
userstable hasmembership_override_by/membership_status/membership_tierwith nosubscription-prefixed column and the index renamed toidx_users_membership_status.Pre-checked for stale references the rename could not follow: no views, functions, or stored policies reference these columns (the sole policy keys on
user_id), and.sqlx/has zero hits, so no offline-cache regeneration is needed.Classified sweep
users.subscription_status/_tier/_override_by,idx_users_subscription_status#[sqlx(rename)]/#[serde(rename)]onmembership_statussubscription_tierfield,subscription_tier_enum,assign_/reset_/upgrade_/admin_set_subscription_tiermembership_*formssubscription_tierJSON field (api <-> web)SubscriptionTiertypeMembershipTierpending DUNITE-7stripe_subscription_id,customer.subscription.*,handle_subscription_{created,updated,deleted},create_free_subscription,get_customer_subscription,cancel_subscription,reactivate_subscription,sweep_stripe_subscriptions,Stripe*Subscription*types, admin-console Stripe copymaybe_create_lifetime_subscriptionliterally creates a $0 Stripe subscriptionEventSource/ event-bus "subscriptions"billing-m1-gap-matrix.mdBusiness tier removal
A single instance has one tier axis. Business versus personal is an instance boundary (PSA Systems versus a8n Tools), not a tier. The backing column was already dropped in
20260327000032, but a Business pricing card, itsBUSINESSfeature array, andBUNYIP_SHOW_BUSINESS_PRICINGsurvived, advertising a tier with no enum variant, no column, and no Stripe price.The flag defaulted to
falsein the code and incompose.yml,compose.dev.yml, and.env.example, so this changes nothing visible in production.PERSONALis renamedSTANDARD_FEATURES. Prose about the business layer Bunyip provides is product positioning and stays.Follow-up in scope on the issue
After DUNITE-7 merges: bump the dunite
revin the threecrates/*/Cargo.tomlfiles, re-run the member-scopedcargo update, and delete the temporaryMembershipTieralias incrates/bunyip-domain/src/models/user.rs.Checks
just check-containergreen (fmt, clippy-D warnings, 186 tests).scripts/check-migration-immutability.shgreen: no committed migration modified, renamed, or deleted.