GitLab Well Architected
Cookbook navigation
Prompts / Plan Database Schema Changes

Plan Database Schema Changes

Planning & ArchitectureArchitectArchitectureDatabaseMigrationPlanningPlanIntermediate

Design safe database migrations with rollback plans. Prevent data loss and minimize downtime.

For GitLab Duo

prompt

Plan database schema changes for:

[FEATURE REQUIREMENTS]

Include:
1. New tables/columns needed
2. Migration steps
3. Impact on existing queries
4. Indexing strategy
5. Rollback plan

Use the prompt

Include the current schema, important queries, and deployment constraints. Existing data and concurrent application versions often determine how a migration can be rolled out.