Skip to content

PostgreSQL migration visualizer - Transform SQL schema changes into weighted directed graphs using AST parsing and graph theory.

Notifications You must be signed in to change notification settings

danmxli/pg_migration_graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_migration_graph

PostgreSQL migration visualizer - Transform SQL schema changes into weighted directed graphs using AST parsing and graph theory.

Features

  • See the project board
  • Visualize schema evolution over time
  • Build dependency graphs from migration scripts

Docker Usage

Building Docker Image

# Build the Docker image
docker build -t pg_migration_graph .

# Then you can manually run the compiled executable
docker run --rm pg_migration_graph "<SQL>"
# Memory debugging
docker run --rm --entrypoint valgrind pg_migration_graph --leak-check=full /app/pg_migration_graph.out "<SQL>"

Development

Project Structure

  • src/ - Source code
  • tests/ - Testing methodology

Testing

Run the tests with:

make test

Acknowledgments

  • libpg_query - C library for accessing the PostgreSQL parser outside of the server environment
  • jansson - C library for encoding, decoding and manipulating JSON data

About

PostgreSQL migration visualizer - Transform SQL schema changes into weighted directed graphs using AST parsing and graph theory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published