{"uid":"cap_VT05uZtXecmZp51a657Ys","slug":"dbmigrate-check-14048ccd","name":"dbmigrate-check","description":"Safety preflight for a database schema migration BEFORE you apply it. Send the migration SQL for Postgres or MySQL and get a pass, caution or block verdict with per-finding operation, severity, plain-language reason and a zero-downtime alternative. Migration-safety indicators, not a guarantee.","url":"https://payai.agentstools.dev/migrate/check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","description":"The migration SQL / DDL text to check"},"format":{"enum":["sql","alembic","auto"],"type":"string","description":"Input format: raw SQL, an Alembic change file, or auto"},"dialect":{"enum":["postgres","mysql"],"type":"string","description":"Database dialect (default postgres)"},"options":{"type":"object","description":"Optional hints: rolling_deploy, pg_version, in_transaction"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Rj9d1bWJE2zXHgL8SWJE6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes database migration SQL for safety issues before execution, returning pass/caution/block verdicts with per-finding severity, reasons, and zero-downtime alternatives.","exampleAgentPrompt":"Before I apply this Postgres migration, can you safety-check it for lock risks and downtime issues? Here's the SQL: ALTER TABLE orders ADD COLUMN status VARCHAR(50) NOT NULL DEFAULT 'pending'; — use auto format detection and flag anything that would block production traffic.","exampleUseCases":[{"title":"Pre-deploy CI gate for migrations","prompt":"I'm about to merge a PR that adds a new index to our users table in Postgres 15. Can you run a safety preflight on this migration SQL and tell me if it's safe to apply during business hours without taking the site down?\n\nSQL: CREATE INDEX idx_users_email ON users(email);"},{"title":"Alembic migration safety review","prompt":"We use Alembic for our MySQL database and I have a new change file that drops a column from the payments table. Can you check this Alembic migration for safety issues and suggest a zero-downtime alternative if there's a risk?"},{"title":"Catch lock-contention in ALTER TABLE","prompt":"I need to add a NOT NULL constraint to an existing column in Postgres — I know that can be dangerous. Can you analyze this migration SQL for lock-contention or table-rewrite risks and tell me the safest way to do it with no downtime?\n\nSQL: ALTER TABLE transactions ALTER COLUMN amount SET NOT NULL;"}],"resultDescription":"A structured report containing an overall verdict (pass, caution, or block), and a list of per-finding objects each with the affected SQL operation, severity level, a plain-language explanation of the risk, and a recommended zero-downtime alternative approach. Results are migration-safety indicators and not a guaranteed outcome.","failureModes":["Invalid or unparseable SQL returns a parse error with no verdict","Unsupported dialect or DDL construct may yield incomplete analysis","Ambiguous schema context (e.g. missing table definitions) may reduce finding accuracy","Network or service errors return HTTP 4xx/5xx with no verdict","Alembic format files with complex Python logic may not fully parse"],"whenToPreferThis":"Use this endpoint when you need a fast, automated safety review of a database migration before applying it to a production Postgres or MySQL database — especially when rolling deploys, table locks, or zero-downtime constraints matter. Prefer it over manual review for CI/CD pipelines, agent-driven deployments, or any ALTER TABLE, DROP, or index operation on large tables.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:18.834Z","isFirstParty":false}