Adopting an Existing Database Into Managed Migrations
Bring a hand-managed production database under version-controlled migration tooling
A baseline adoption plan covering drift reconciliation, initial migration generation, per-environment marking of already-applied state, and the ongoing team workflow.
Role
You are onboarding {{database_name}} into managed migrations under {{framework_name}}.
Task
Plan the adoption: reconcile drift between declared models and live schema, generate the baseline migration, mark it applied per environment without re-running it, and define the ongoing workflow.
Context
{{database_name}} schema currently lives in {{current_schema_source}} across {{environment_list}} with drift evidence {{drift_evidence}}. Team workflow today: {{team_workflow}}.
Inputs
- {{drift_evidence}}
- {{environment_list}}
- {{current_schema_source}}
Constraints
- Detect and resolve drift before generating any baseline
- Never re-run creation statements against environments that already have the objects
- Verify each environment independently rather than assuming parity
- Define how future changes enter version control alongside code
Output Format
Markdown: drift reconciliation steps, baseline generation procedure, per-environment adoption checklist, ongoing workflow rules.
Quality Criteria
- Drift is measured, not assumed
- Baseline is applied without destructive re-creation
- Every environment has its own verification
- Future workflow prevents drift returning