Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The deploy-request command
This command allows you to create, review, diff, and manage deploy requests for your Vitess clusters. This command is not currently available for Postgres database clusters.
Usage:
Your database must have a production branch with safe migrations enabled before you can create a deploy request.
Available sub-commands
* Flag is requiredThe value
<DR_NUMBER> represents the deploy request number (not to be confused with id). To see a deploy request number, run pscale deploy-request list <DATABASE_NAME>.
You can also find the number in the PlanetScale dashboard in the URL of the specified deploy request: https://app.planetscale.com/<ORGANIZATION>/<DATABASE>/deploy-requests/<DR_NUMBER>.
Sub-command flag descriptions
Some of the sub-commands have additional flags unique to the sub-command. This section covers what each of those does. See the above table for which context.Available flags
Global flags
Examples
The deploy-request command with review subcommand and --comment flag
Command:
<DATABASE_NAME>/1.
The deploy-request command with force-cutover subcommand
The final step of a migration requires a brief table lock. Long-running transactions can block that lock and delay completion. PlanetScale retries for up to 1 hour, then forces cutover automatically. Use this command to skip the wait. It kills long-running transactions that are blocking the table lock so the migration can finish.
Only allowed when the deployment state is in_progress_cutover. See Aggressive cutover.
Command:
<DATABASE_NAME>/<DR_NUMBER>. Vitess will attempt again momentarily.
The deploy-request command with the --aggressive-cutover flag
Opt a single deploy request into aggressive cutover ahead of time, so you don’t have to wait for the delay and run force-cutover. This is per deploy request, not the database-level setting, and other deploy requests are unaffected. You can change it until the deploy request is deployed.
Command:
show and queue include an AGGRESSIVE CUTOVER column. With --format json, check deployment.aggressive_cutover.
The deploy-request command with retry subcommand
When an online schema deploy fails on some tables while others are still copying or ready, the deploy stays in progress. The deploy page shows that it has partially failed and cannot continue.
Retry will restart the migration for only the failed tables. Tables that already healthy will keep their existing progress.
Command:
The deploy-request command with throttler update subcommand
Adjust the migration throttler for a single deploy request. This is per deploy request, not the database-level throttler. Use --ratio for one ratio across all eligible keyspaces, or --configuration for per-keyspace ratios.
Command:
<DATABASE_NAME>/<DR_NUMBER> is updated.
The deploy-request command with unblock subcommand
When a deployment or revert errors, PlanetScale blocks the deploy queue as a precaution. This is the same
action as Unblock deploy queue in the dashboard. It does not apply a gated deploy, which is
deploy-request apply, and it does not fix a schema that failed deploy checks.
Command:
The deploy-request command with update subcommand
Changes settings on an existing deploy request. At least one flag is required, and flags you leave off are
not sent. edit is an alias for this command.
Command:

