Urgent.News

What's breaking now, across thousands of outlets.

Tech

Migrate from SchemaSpy to SchemaCrawler Without Rewriting Your Runbooks

If you already use SchemaSpy to document a database, moving to SchemaCrawler does not have to mean replacing every script at once. The latest SchemaCrawler release includes a SchemaSpy-compatible shim. It accepts common SchemaSpy command-line arguments, connects to the database, and runs SchemaCrawler Scribe to produce documentation in Google Open Knowledge Format (OKF). That gives you a gradual…

SchemaSpy users can migrate to SchemaCrawler without rewriting existing runbooks by utilizing a SchemaSpy-compatible shim included in the latest SchemaCrawler release. This shim accepts common SchemaSpy command-line arguments, connects to the database, and runs SchemaCrawler Scribe to generate documentation in Google Open Knowledge Format (OKF).

The output is in Markdown files with YAML frontmatter, which are easier to review in pull requests, search with ordinary text tools, and give to other tools without first scraping the pages. The documentation can include tables, columns, keys, constraints, triggers, routines, Mermaid diagrams, and lint reports. SchemaCrawler's native command line can be used for more advanced features like linting and row counts.

To set up the migration, use the 'schemaspy' shim in the Docker image or install SchemaCrawler locally. The Docker command allows mounting the current directory, making the database and generated ZIP available in the current directory. Check the adapter documentation for unsupported options. Once the compatibility shim is working, switch to SchemaCrawler's native command line for more features.

The generated OKF directory can be checked into GitHub as a build artifact for a documentation repository, making schema changes visible in pull requests. Publish the OKF bundle with GitHub Pages using Jekyll, as OKF pages include YAML frontmatter, allowing the generated directory to be used as the source for a Pages site.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 26 August →