Migration Until Clean
This loop automatically detects and fixes database migration issues by iteratively running migrations, analyzing errors, and applying corrective code changes…
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Start the "Migration Until Clean" loop.
Goal: Fix migration issues
Max iterations: 10
Between iterations run: npm run migrate
Exit when: Migration succeeds
Start the Migration Until Clean loop. Run 'npm run migrate' to check current status, analyze any errors or failed migrations, identify the root cause of the issue, and apply appropriate fixes to migration files, schema definitions, or dependencies. Continue this process iteratively until the migration completes successfully or 10 iterations have been reached, whichever comes first. After each attempt, inspect the results carefully before making changes.
Self-pace this loop. After each iteration, run `npm run migrate` and evaluate the output, and only continue if the exit condition is not met (Migration succeeds). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.