# mig2schema

> Use this tool when you need to extract database schema from PostgreSQL migration files, to understand the final database structure without manual tracking. It solves problems of documenting database schemas, analyzing migration outcomes, and integrating schema extraction into CI/CD workflows. The tool takes PostgreSQL migration files as input and outputs human-readable schema information and SQL DDL, supporting various naming conventions and validation capabilities.

Canonical page: https://skillsregistry.net/skills/alc6-mig2schema  
JSON: https://api.skillsregistry.net/v1/skills/alc6-mig2schema

## Description

This MCP server extracts database schema from PostgreSQL migration files by spinning up temporary PostgreSQL containers using testcontainers, running the migrations, and then extracting the resulting schema information. Built in Go with support for multiple extraction providers including native SQL queries and pg_dump, it offers both human-readable schema information and SQL DDL output formats, making it useful for developers working with large migration directories who need to understand the final database structure without manually tracking changes across multiple migration files. The implementation supports various migration file naming conventions and provides validation capabilities, serving teams that need to document database schemas, analyze migration outcomes, or integrate schema extraction into CI/CD workflows.

## Trust

- **Trust score (0–1):** 0.97
- **Verification tier:** verified
- **Last scanned:** 2026-09-19

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** database
- **Updated:** 2026-09-19

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/alc6-mig2schema)
- **Repository:** <https://github.com/alc6/mig2schema>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "alc6-mig2schema"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/alc6-mig2schema` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/alc6-mig2schema/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
