Source:
ocean/docs/adr/010-manual-deployment-process.md| ✏️ Edit on GitHub
ADR-010: Manual Supabase Deployment Process
Status
Accepted
Date
2025-08-11
Context
Investigation revealed that while the project has CI/CD for frontend deployment via Vercel, there is no automated deployment pipeline for:
- Supabase database migrations
- Supabase Edge Functions
- Supabase secrets/configuration
This has led to:
- Unapplied migrations (including tenant provisioning schema)
- Undeployed Edge Functions (like provision-tenant-resources)
- Features not working in production despite code being merged
Decision
For now, we acknowledge that Supabase deployments are manual and document the process:
Database Migrations
# Check migration status
supabase migration list
# Apply migrations
supabase db push
# If migrations are out of order
supabase db push --include-all
Edge Functions
# Deploy all functions
supabase functions deploy
# Deploy specific function
supabase functions deploy provision-tenant-resources
Secrets Management
# List secrets
supabase secrets list
# Set a secret
supabase secrets set NEON_API_KEY=your_key_here
Current Issues Found
- Permission errors in migrations: Some migrations try to modify Supabase-owned schemas (like
net) - Missing Edge Functions: Several functions exist in code but aren't deployed
- Out-of-order migrations: Development happened across branches causing ordering issues
Consequences
Positive
- Clear documentation of current state
- Understanding of why features aren't working
- Path forward for automation
Negative
- Manual process is error-prone
- Easy to forget deployment steps
- No rollback mechanism
- Production/staging divergence
Neutral
- Requires developer discipline
- Need to coordinate deployments
Future Improvements
- Create GitHub Action for Supabase deployments
- Add deployment checklist to PR template
- Consider using Supabase branching for staging
- Add deployment status checks
References
- No existing deployment workflows found in
.github/workflows/ - Manual deployment commands in various docs
- CLAUDE.md states "use CI/CD pipeline" but only for frontend