choose_backend_switchover
Choose a backend switchover strategy: fully switch to Supabase, keep previews on old backend, park Supabase as backup, or handle manually. Applies the selected method or skips changes.
Instructions
Choose how to handle backend switchover in Phase 7. Call when MANUAL_CHOOSE_BACKEND_SWITCHOVER is READY. IMPORTANT: You MUST present these options to the user and ask them to choose before calling this tool. Four choice values are supported (use the literal string in your choice arg):
'switch-fully-to-supabase' (method='auto') — Staticbot opens a GitHub PR that replaces ALL Supabase env vars (URL, anon key) in the repo with the migrated target's values. After the PR is merged, BOTH the source platform's previews AND production use the new Supabase. This is the 'I'm leaving Lovable/Base44 for good' choice.
'source-preview-supabase-prod' (method='skip') — Production deployments read from the migrated Supabase backend; the source platform's preview environment keeps using its own managed Supabase as before. Good for gradual rollout where you keep developing in Lovable/Base44 but ship from the new Supabase. (Only shown to LOVABLE_SUPABASE and BASE44_SUPABASE customers — Bolt previews use WebContainer, not a separately-hosted Supabase.)
'source-primary-supabase-backup' (method='skip') — Nothing changes for now. The live app stays on the source platform's current setup; the migrated Supabase project is parked as a fallback the user can switch to later. (Same platform gating as #2.)
'handle-myself' (method='skip') — No automated changes. The user will update environment variables themselves whenever they're ready.
Historical aliases: the old lovable-preview-supabase-prod and lovable-primary-supabase-backup IDs are still accepted by the backend (it stores choice as an opaque label). Prefer the source-* names for new calls so analytics filters reflect the platform-agnostic semantic.
Platform-specific job creation under method='auto': • BASE44_SUPABASE — creates MANUAL_SWITCH_BASE44_SECRETS jobs (Base44 manages env vars on its platform, not in GitHub). The user updates secrets in Base44's UI. • BASE44_NATIVE — Phase 7 is fully automated (installs @bitfiction/base44-supabase-shim into the repo). No manual CHOOSE gate. • All other source types — rewrites env vars in the GitHub repo directly. Do NOT pick an option without asking the user first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The MANUAL_CHOOSE_BACKEND_SWITCHOVER job ID | |
| choice | No | Switchover strategy: 'switch-fully-to-supabase' | 'source-preview-supabase-prod' | 'source-primary-supabase-backup' | 'handle-myself' (or the deprecated `lovable-*` aliases for backward compat) | |
| method | Yes | Switchover method | |
| migrationId | Yes | Migration ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Parsed JSON response from the Staticbot public API |