Skip to content

CONCEPT Cited by 5 sources

Deploy request

Definition

A deploy request is PlanetScale's first-class primitive for proposing a schema change against a target database. It is the database-schema analog of a pull request: an engineer opens a deploy request against a PlanetScale branch, reviewers approve it, the system executes the change as a staged online schema change, and a 30-minute revert window follows.

Verbatim introduction (Coutermarsh, 2024):

"The bot automatically opens a deploy request for us and leaves a comment linking to the change in GitHub. This allows our team to review both the schema change as well as the code. Giving full context around why and what is being changed." (Source: sources/2026-04-21-planetscale-how-planetscale-makes-schema-changes)

Five lifecycle stages

  1. Created — engineer (or PR-bot) opens a deploy request targeting a production branch. The request carries the proposed DDL.
  2. Linted — pre-execution lint catches "any common mistakes" before any DDL runs against production (Coutermarsh: "Before the schema change is even deployed, checks are run through a linter").
  3. Staged — Vitess begins the online migration (shadow-table build + backfill + binlog tail). See concepts/staged-then-sealed-migration.
  4. Ready — the shadow table has caught up and is ready to cut over. At this point the deploy request is either auto-applied or waits on operator click-through (see patterns/operator-scheduled-cutover). Multi-change deploy requests wait for every change to be ready (concepts/gated-schema-deployment).
  5. Cut over — the atomic table-swap seals the change. A 30-minute revert window follows during which the change can be rolled back by playing inverse replication.

Why it's a pull-request analog

Both PRs and deploy requests share:

Property Pull request Deploy request
Proposed change Code diff DDL diff
Target Branch Database branch
Review gate Approve / request changes Approve / cancel
Execution Merge → CI → deploy Apply → online migration → cut over
Reversible? git revert 30-min revert via inverse replication

Coutermarsh's PlanetScale-internal workflow exploits the symmetry: the PR-bot creates a deploy request whose link is posted back to the PR comment, so reviewers see both the code diff and the schema diff in one context. The two units deploy independently but are reviewed together.

Composition with other primitives

  • With concepts/schema-change-queue — when multiple deploy requests target the same branch concurrently, PlanetScale serialises them via the queue and runs combined-schema safety checks.
  • With gated deployment — a deploy request can carry multiple DDL statements that are staged independently and cut over together as a single near-atomic unit.
  • With patterns/operator-scheduled-cutover — an "Auto-apply" checkbox lets operators defer the cut-over moment past staging completion; the deploy request sits in ready state awaiting click.
  • With patterns/instant-schema-revert-via-inverse-replication — after cut-over, inverse replication runs for 30 minutes so the request can be rolled back.

Seen in

Last updated · 378 distilled / 1,213 read