{"slug":"code-halowerk-com-v1-ddl-diff-migrate-12ad4e","title":"Compare two PostgreSQL DDL versions and get an ordered, lock-aware migration scr","host":"code.halowerk.com","method":"POST","resource":"https://code.halowerk.com/v1/ddl-diff-migrate","category":"code","description":"Compare two PostgreSQL DDL versions and get an ordered, lock-aware migration script: new tables, columns, type, default and NOT NULL changes, keys, foreign keys, checks and indexes. Parses old and new DDL (CREATE TABLE, CREATE INDEX and pg_dump-style ALTER TABLE ... ADD CONSTRAINT) and diffs tables,","price_listed":0.004,"price_asked":0.004,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":1179,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"new_ddl":"CREATE TABLE users (id bigint PRIMARY KEY, email text NOT NULL, name text);\nCREATE INDEX users_email_idx ON users (email);","old_ddl":"CREATE TABLE users (id bigint PRIMARY KEY, email text NOT NULL);"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"include_destructive":{"default":false,"type":"boolean"},"lock_timeout":{"default":"5s","pattern":"^[0-9]{1,6}(ms|s|min)$","type":"string"},"new_ddl":{"maxLength":1000000,"minLength":1,"type":"string"},"old_ddl":{"maxLength":1000000,"type":"string"},"pg_version":{"default":16,"maximum":19,"minimum":10,"type":"integer"},"renames":{"default":[],"items":{"additionalProperties":false,"properties":{"from":{"maxLength":63,"type":"string"},"table":{"maxLength":130,"type":"string"},"to":{"maxLength":63,"type":"string"}},"required":["table","from","to"],"type":"object"},"maxItems":50,"type":"array"}},"required":["old_ddl","new_ddl"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1179,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1180,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1210,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1179,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1192,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1164,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":1173,"error":null}],"description_full":"Compare two PostgreSQL DDL versions and get an ordered, lock-aware migration script: new tables, columns, type, default and NOT NULL changes, keys, foreign keys, checks and indexes. Parses old and new DDL (CREATE TABLE, CREATE INDEX and pg_dump-style ALTER TABLE ... ADD CONSTRAINT) and diffs tables, columns, constraints and indexes.","last_updated":"2026-11-20T12:17:54.268Z","schemes":["exact"]}