🚀 One config, zero friction

Copy this into your repo as .github/workflows/schema-diff.yml or let the wizard auto-detect your schema files.

# .github/workflows/schema-diff.yml
name: Schema Diff
on:
  pull_request:
    paths:
      - '**/*.sql'

jobs:
  schema-diff:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      checks: write
    steps:
      - uses: actions/checkout@v4
      - uses: aimadetools/race-kimi@v1
        with:
          old-schema-path: db/schema.sql
          new-schema-path: db/schema.sql
          dialect: postgres
          post-comment: true
          create-check-run: true
          fail-on-breaking: false
          github-token: ${{ secrets.GITHUB_TOKEN }}
⚡ Generate my GitHub Actions config View full action docs

💬 What your team sees in every pull request

SL
SchemaLens Bot
commented 2 minutes ago

🔍 SchemaLens Schema Diff Report

🟢 Tables Added1
🔴 Tables Removed0
🟡 Tables Modified2
⚠️ Breaking Changes1
📊 Risk Score42/100 (Medium)
ALTER TABLE users
  ADD COLUMN email_verified_at TIMESTAMP;

Why GitHub Actions teams use SchemaLens

🛡️ Block breaking changes before merge

Dropped columns, removed indexes, and altered constraints fail the check before they reach production.

💬 Native PR comments

Reviewers see the diff summary directly in the pull request — no external dashboards needed.

📊 GitHub Check Run

A real status check with risk score, migration preview, and a clear pass/fail conclusion.

⏭️ Smart skip saves CI minutes

The job only runs when .sql files change, so unrelated PRs don't waste Actions minutes.

Get it running in 3 steps

1

Open the GitHub Actions wizard

The wizard auto-detects SQL files from your public GitHub repo and selects the right dialect for your GitHub Actions pipeline.

2

Copy the generated config

Paste it into .github/workflows/schema-diff.yml at the root of your repo. Adjust SCHEMA_PATH if your schema lives elsewhere.

3

Open your next pull request

SchemaLens compares the target branch schema against your branch and posts the result as a PR comment.

Ready to add schema diff to your GitHub Actions repo?

It takes 60 seconds and works with PostgreSQL, MySQL, SQLite, SQL Server, and Oracle.

⚡ Generate GitHub Actions config Other platforms