Add schema diagram workflow using SchemaCrawler-Action#188
Open
Add schema diagram workflow using SchemaCrawler-Action#188
Conversation
Create a GitHub Actions workflow that generates database schema diagrams using SchemaCrawler-Action. The workflow: - Triggers on push/PR to main when backend model files change - Supports manual dispatch - Creates a sample SQLite DB from SQLAlchemy models - Generates a schema diagram PNG via SchemaCrawler - Uploads the diagram as a workflow artifact Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub action workflow for schema diagram
Add schema diagram workflow using SchemaCrawler-Action
Feb 7, 2026
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
=======================================
Coverage 71.82% 71.82%
=======================================
Files 11 11
Lines 802 802
Branches 124 124
=======================================
Hits 576 576
Misses 163 163
Partials 63 63
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automated generation of a database schema diagram in CI to visualize the current SQLAlchemy/SQLite schema.
Changes:
- Introduces a new
schema-diagramGitHub Actions workflow that generates a PNG schema diagram and uploads it as an artifact. - Adds a helper script to generate an empty SQLite database from the SQLAlchemy ORM metadata for SchemaCrawler to introspect.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/schema-diagram.yml |
New workflow to create a sample DB, run SchemaCrawler, and upload a diagram artifact. |
.github/scripts/create-sample-db.sh |
New script to create the SQLite schema via Base.metadata.create_all(). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions workflow to auto-generate database schema diagrams from the SQLAlchemy models using SchemaCrawler-Action.
.github/workflows/schema-diagram.yml— Triggers on model changes tomain(push/PR) andworkflow_dispatch. Creates a sample SQLite DB from the ORM models, runs SchemaCrawler to produce a PNG diagram, uploads as artifact..github/scripts/create-sample-db.sh— Generates an empty SQLite database with the full schema viaBase.metadata.create_all(). Accepts output path as argument.SchemaCrawler-Action is Docker-based, so it uses a version tag (
@v17.6.0) rather than a SHA pin — Docker actions don't resolve SHAs correctly.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.