Repository navigation
feat: add guarded Stripe plan migration - #816
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Execution can revoke scheduled cancellations and replacement subscriptions may lose source-level payment methods.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds a guarded, Stripe-driven migration from Explorer/legacy plans to Basic/Build, with dry runs, audit logging, canaries, and production safeguards.
Changes:
- Adds migration planning, execution, validation, and unit tests.
- Replaces legacy scripts with guarded wrappers and updates runbooks.
- Corrects the external-database migration command.
| File | Description |
|---|---|
tests/unit/admin/subscription-migration-plan.test.ts |
Tests migration planning and calendar-month behavior. |
src/types/environment.d.ts |
Adds migration environment variables. |
src/services/admin/subscription-migration-plan.ts |
Implements migration planning. |
scripts/README.md |
Documents the authoritative command. |
scripts/README-SUBSCRIPTION-MIGRATION.md |
Retires bulk subscription creation. |
scripts/README-SUBSCRIPTION-ACTIVATION.md |
Retires database-driven activation. |
scripts/MIGRATION-EXPLORER-PLAN.md |
Provides the production runbook. |
scripts/migrate-studio-plans.ts |
Implements guarded Stripe migration execution. |
scripts/find-subscriptions-to-activate.sql |
Marks subscription query as audit-only. |
scripts/find-customers-without-subscriptions.sql |
Marks customer query as audit-only. |
scripts/create-stripe-subscriptions.sh |
Wraps the guarded migration command. |
scripts/activate-subscriptions.sh |
Wraps the guarded migration command. |
package.json |
Registers the migration command. |
example.env |
Documents migration configuration. |
docker/with-external-db/docker-compose-with-db.yml |
Corrects the database migration command. |
.gitignore |
Excludes production environment and audit outputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cheqd-bot Bot
pushed a commit
that referenced
this pull request
Sep 29, 2026
## [3.17.0-develop.7](3.17.0-develop.6...3.17.0-develop.7) (2026-09-29) ### Features * add guarded Stripe plan migration ([#816](#816)) ([e4e495d](e4e495d))
|
🎉 This PR is included in version 3.17.0-develop.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
cheqd-bot Bot
pushed a commit
that referenced
this pull request
Sep 29, 2026
## [3.17.0](3.16.1...3.17.0) (2026-09-29) ### Features * **account:** add GET /account/balances with CHEQ/USD conversion ([bfc013e](bfc013e)) * **account:** add GET /account/balances with CHEQ/USD conversion ([#814](#814)) ([6a2510e](6a2510e)) * Add Faucet API access headers ([#810](#810)) ([59d9f7e](59d9f7e)) * add guarded Stripe plan migration ([#816](#816)) ([e4e495d](e4e495d)) * Align Basic/Build plans and add testnet faucet API ([#811](#811)) ([7b00c1f](7b00c1f)) * Start Basic plan as trial for new Studio accounts ([#812](#812)) ([52c2249](52c2249)) ### Bug Fixes * Add missing body parameters for faucet topup requests ([#813](#813)) ([a61bfd5](a61bfd5)) * Improve error-handling for faucet requests ([89ed790](89ed790)) * revert semantic-release version for node 20 ([0915874](0915874)) * **test:** correct no-auth spec matching in Playwright projects ([348251a](348251a)) * **test:** move credential verify test out of no-auth suite ([36bae65](36bae65))
|
🎉 This PR is included in version 3.17.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
npm run migratescriptCurrent production dry run
No Stripe mutations are performed by the PR or by the default command.
Verification
npm run test:unit -- --runInBand(18 suites, 148 tests)npm run build:app.env.productiondry run