Operations Runbooks
Migrations:
npx wrangler d1 migrations apply chyperai_db --remote
npx wrangler d1 execute chyperai_db --remote --command "SELECT * FROM tenants;"
Seed data:
npx wrangler d1 execute chyperai_db --remote --file db/migrations/0003_seed.sql
Rollback Pages Functions:
- Open Pages project in Cloudflare dashboard
- Find previous successful deployment
- Click Rollback
Rotate secrets:
npx wrangler pages secret delete GITHUB_CLIENT_SECRET
npx wrangler pages secret put GITHUB_CLIENT_SECRET
Incident checklist:
- Verify
/api/hellohealth. - Check Durable Object errors (Worker logs) and D1 availability.
- Roll forward or back based on deployment status.
- Communicate status page updates and ETAs.