> ## Documentation Index
> Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Development environments

> Set up empty branches for schema work and disposable test data.

Use a Neki development branch for application development, integration tests,
schema rehearsal, and other non-production work. Each branch is isolated from
its parent and has its own connection strings and infrastructure.

## Initialize the environment

[Development branches start empty](/docs/neki/branching#development-branches-start-empty).
Treat environment creation as a repeatable application setup:

<Steps>
  <Step>Create a [development branch](/docs/neki/branching#create-a-development-branch) and wait for it to become ready.</Step>
  <Step>Create a role or password for the branch.</Step>
  <Step>Run the same schema migration command used by a fresh application deployment.</Step>
  <Step>Load deterministic seed or fixture data.</Step>
  <Step>Run a connection check and the application's integration tests.</Step>
</Steps>

This workflow catches migrations that accidentally depend on objects or data
already present in a long-lived database.

## Test with representative topology

A new development branch begins with one managed shard. One shard is enough for
most schema and compatibility tests, but it cannot reveal every distributed
query problem.

When testing sharding behavior:

* Create the additional shards and data topology deliberately.
* Seed rows that cover every key range.
* Test single-shard and scatter query plans.
* Exercise joins, transactions, sequences, reference tables, and GSIs used by
  the application.
* Check [Query Insights](/docs/neki/monitoring/query-insights) and router metrics for
  unexpected fan-out.

## Use production-like data safely

Restore a backup to a new branch when a test requires existing data. Apply your
organization's access-control, retention, and sensitive-data policies to the
restored branch. Delete the branch and any retained manual backups after the
test is complete.

Restore sizing determines the new branch type. Select a development cluster
SKU for every configuration profile and a development router SKU when creating
a disposable environment. If you omit sizing, the restore inherits the source
profile and router settings; restoring a production backup without development
overrides creates a production branch with production availability, branch
limits, and billing. Development and production profile sizes cannot be mixed
in one restore.

Do not use a development branch as a production failover target. To serve
production traffic from a tested environment, [promote the
branch](/docs/neki/branching#promote-a-development-branch) first. Promotion is not a
substitute for a production availability and recovery plan.

## Control cost

Development branches have separate shard, router, storage, backup, and network
usage. Delete environments that are no longer needed and keep test backup
retention intentional. See [Neki pricing](/docs/neki/pricing#development-branches).

## Need help?

Get help from [the PlanetScale Support team](https://planetscale.com/contact?initial=support), or join our [Discord community](https://pscale.link/community) to see how others are using PlanetScale.
