{"uid":"cap_IlL7YiIqSy3znSZh-q5v6","slug":"writerslogic-migration-reversibility-classifier-dc35ef47","name":"WritersLogic Migration Reversibility Classifier","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/migration-reversibility?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","maxLength":20000,"description":"The migration's statements."},"dialect":{"enum":["postgres","mysql","sqlite"],"type":"string"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oJAcQydOFt33P3VtrKN6X","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies each SQL migration statement as reversible, needs-backup, needs-original-definition, or irreversible, and provides a mechanical inverse statement where possible","exampleAgentPrompt":"Can you check this PostgreSQL migration for reversibility? I have a script that drops a column and alters a type — I want to know which statements are irreversible, which need a backup first, and get rollback SQL for anything that can be undone.","exampleUseCases":[{"title":"Pre-deploy migration safety review","prompt":"Before we deploy this migration to production, can you analyze this MySQL migration script and tell me which statements are irreversible, which are safe to roll back, and flag any lock or non-transactional DDL hazards? Here's the SQL: ALTER TABLE orders DROP COLUMN legacy_code; CREATE INDEX idx_status ON orders(status);"},{"title":"Auto-generate rollback script","prompt":"I have this SQLite migration and I need a rollback script. Can you go through each statement, classify whether it's reversible, and give me the inverse SQL for every statement that has one?"},{"title":"CI pipeline migration gating","prompt":"We're running automated checks before merging this database PR. Can you classify each statement in this Postgres migration as reversible, needs-backup, needs-original-definition, or irreversible so our pipeline can block the merge if there are any irreversible or backup-required changes?"}],"resultDescription":"A per-statement breakdown classifying each SQL statement as reversible, needs-backup, needs-original-definition, or irreversible. For reversible statements, a mechanical inverse SQL statement is included. Statements the classifier does not support are marked as 'unsupported'. Hazard flags are raised for DROP TABLE/COLUMN, TRUNCATE, unbounded DELETE/UPDATE, lossy type changes, NOT NULL/constraint violations, table-rewrite and lock hazards, and MySQL non-transactional DDL.","failureModes":["Unsupported statement forms return 'unsupported' classification rather than an error","Input exceeding 20000 characters is rejected","Unknown dialect values cause validation error","Complex or vendor-specific syntax may fall back to 'unsupported'","No row-count or runtime data is available, so constraint-failure risk is static only"],"whenToPreferThis":"Use this endpoint when an AI agent needs to review or write database schema migrations and must assess rollback safety, data loss risk, or generate inverse statements without executing any SQL. Ideal for CI/CD pipelines, code review agents, or migration planning tools that need a fast, deterministic, tokenizer-level analysis of Postgres, MySQL, or SQLite migrations without database connectivity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:31.038Z","isFirstParty":false,"canonicalSlug":"writerslogic-migration-reversibility-classifier-dc35ef47"}