{"uid":"cap_hEpCMc_c2Af4CqMKsto23","slug":"payai-batch-migration-safety-preflight-ac891363","name":"PayAI Batch Migration Safety Preflight","description":"Batch safety preflight for many database migrations at once: a list of objects each with a name and migration SQL. Returns a per-file pass, caution or block verdict plus a rollup with the worst verdict and counts. Migration-safety indicators, not a guarantee.","url":"https://payai.agentstools.dev/migrate/batch","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"format":{"enum":["sql","alembic","auto"],"type":"string","description":"Default input format for entries that do not set one"},"dialect":{"enum":["postgres","mysql"],"type":"string","description":"Default dialect for entries that do not set one"},"migrations":{"type":"array","items":{"type":"object"},"description":"List of objects, each with name and migration SQL"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4AnTHpVzeTK_xXDxuMel4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs safety preflight checks on multiple database migration SQL files at once, returning per-file pass/caution/block verdicts and a rollup summary.","exampleAgentPrompt":"Can you safety-check these three migration files for me before I deploy? File 1 is called 'add_user_index' with SQL 'CREATE INDEX ...', File 2 is 'drop_old_column' with SQL 'ALTER TABLE users DROP COLUMN legacy_id', and File 3 is 'rename_table' with SQL 'ALTER TABLE orders RENAME TO orders_v2' — I need to know which ones are safe, which need caution, and which I should block.","exampleUseCases":[{"title":"Pre-deploy CI/CD migration gate","prompt":"Before we merge this PR, can you run a batch safety preflight on all 5 migration files in the PR? Here they are with their SQL — I want a pass, caution, or block verdict for each one and an overall rollup before we let this go to production."},{"title":"Audit risky migration in sprint release","prompt":"We have a release going out tonight with 4 migrations. Can you check all of them for safety issues? I'm especially worried about the one that drops a column — give me a verdict per file and tell me what the worst-case risk is overall."},{"title":"Onboarding legacy migrations review","prompt":"I've inherited a codebase with 8 old migration SQL files and I need to know which ones would be dangerous to run. Can you do a batch safety check on all of them and flag anything that should be blocked or needs caution?"}],"resultDescription":"Returns a list of per-file results each containing the migration name and a verdict of pass, caution, or block, along with a rollup object summarizing the worst overall verdict across all files and counts of how many files fell into each verdict category. These are migration-safety indicators, not guarantees.","failureModes":["Empty or malformed migration list returns an error","Invalid or unparseable SQL may result in an error or conservative block verdict","Missing required fields (name or SQL) per migration object cause validation errors","Very large batches may hit payload or timeout limits","Network or service errors return non-200 status codes"],"whenToPreferThis":"Use this endpoint when you need to safety-check multiple database migration SQL files in a single call, especially in CI/CD pipelines or pre-deployment workflows where batch throughput matters. Prefer this over single-file validation when you have 2 or more migrations to check simultaneously and want a consolidated rollup verdict alongside per-file results.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:02:15.891Z","isFirstParty":false}