Getting started

Introduction

Bedrock is a GitHub App that reviews database migration pull requests — across Prisma, Drizzle, Django, Rails, raw SQL, and more. This is the 5-minute version of what it does and how to install it.

What you get

  • Automatic PR check on every PR that touches your schema or migrations — Prisma, Drizzle, Django, Rails, raw SQL, and more.
  • A structured report: risk score, change classification, blast radius, generated SQL rollout, backfill, rollback, suggested tests.
  • A GitHub PR comment with verdict and the top 3 issues, linked to the full report.
Why this matters
In June 2025, a routine database migration cascaded into a multi-hour GitHub outage affecting millions of developers. In February 2024, Resend ran a migration that dropped all production tables — their API was down for 12 hours. These are not edge cases. They are what happens when migration review is manual and incomplete.

Mental model

Bedrock is not a linter. A linter looks at one file in isolation. Bedrock parses both versions of your schema, builds a typed change list, scans your TypeScript to see who reads/writes the affected columns, and synthesizes a multi-step rollout plan that humans can edit.

Compared to
Atlas plans and applies schema diffs. Squawk lints SQL. SchemaHero reconciles declarative state in Kubernetes. Bedrock reviews changes against existing production — including the app code that depends on them. Different problem, mostly orthogonal. Pair Bedrock with CodeRabbit for full coverage: CodeRabbit reviews your application code, Bedrock reviews the migration that changes your database. See Bedrock vs alternatives.

Five-minute setup

Install the GitHub App, point Bedrock at one repo, open a PR with a schema change, and watch the check run.

bash
# 1. install the app
gh app install bedrock-db-safety --repo your-org/api

# 2. open a PR that touches schema.prisma
git checkout -b add-org-membership
$EDITOR prisma/schema.prisma
git commit -am "add org membership"
gh pr create --fill

What the report looks like

For each schema-touching PR, Bedrock posts:

  • A verdict (approved, review, or blocked) and a 0–100 risk score.
  • The top 3 risks, each with a one-line “why” and a suggested fix.
  • A link to the full interactive report — diff, blast radius, generated SQL, rollback playbook.
Try it now
You can run a review without installing anything. Open the demo migration in the analyzer to see the full report.
Docs · Introduction — Bedrock