Skip to content

Commit c201da9

Browse files
committed
feat(pricing): rip 14-day trial, add activity-based auto-pause foundation
1 parent 1be09e4 commit c201da9

27 files changed

Lines changed: 335 additions & 1241 deletions

File tree

.changeset/pricing-sprint-a.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@secondlayer/shared": minor
3+
"@secondlayer/cli": patch
4+
---
5+
6+
Pricing foundation (Sprint A) — switch from 14-day trial to activity-based auto-pause, org-level billing prep.
7+
8+
- Migration 0046 drops `tenants.trial_ends_at` + index, adds `tenants.last_active_at timestamptz NOT NULL DEFAULT now()` with index `(plan, last_active_at) WHERE status = 'active'`
9+
- Migration 0047 adds nullable `tenant_id` to `usage_daily` (+ best-effort backfill for single-tenant accounts), widens the unique key to `(account_id, tenant_id, date)` so Sprint-C Stripe metering can bill per-tenant
10+
- `TrialExpiredError` + `TRIAL_EXPIRED` code dropped (dead after trial removal)
11+
- New `bumpTenantActivity(slug)` + `listIdleHobbyTenants(idleSince)` query helpers
12+
- CLI drops trial-days-left from `sl instance info` and `sl whoami`, drops `TRIAL_EXPIRED` handlers

0 commit comments

Comments
 (0)