Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale 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 required
The 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:
Output: A comment is added to the deploy request <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:
Output: Successfully requested force cutover for deploy request <DATABASE_NAME>/<DR_NUMBER>. Vitess will attempt again momentarily.

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:
Output: The throttler configuration for deploy request <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:

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.