Prompt file imported from VuongNQ/Movie-streaming (
.github/prompts/plan-firestore-migration.prompt.md). Fill in{{objective}},{{targets}},{{timeline}},{{clients}}before use. Copyright stays with the author.
Plan Firestore Migration
Create a migration plan for Firestore schema or role-behavior changes in this repository.
Inputs
- Migration objective: {{objective}}
- Affected collections/fields: {{targets}}
- Deadline or release window: {{timeline}}
- Client versions impacted: {{clients}}
Requirements
- Use phased rollout:
- introduce
- dual write
- backfill
- cutover
- cleanup
- Ensure backward compatibility for mixed client versions.
- Define idempotent backfill strategy and resume checkpoints.
- Define verification metrics and sampling method.
- Define rollback triggers and exact rollback actions.
- Identify updates needed in docs and related instructions.
Expected Output
- Migration design doc with phases and ownership.
- Risk register with mitigations.
- Validation checklist for pre, during, and post rollout.
- Rollback playbook.
- Optional pseudocode or scripts for backfill execution.
Guardrails
- Prefer additive changes before destructive changes.
- Never require all clients to upgrade simultaneously.
- Call out any assumptions about current data shape.
- Preserve movie document id alignment and note the current admin-dashboard write path for created_at/last_updated when those fields are affected.