Skip to main content
Yboard uses Neon serverless Postgres, which supports database branching — creating isolated copies of your database for development, testing, and preview deployments.

What is a database branch?

A database branch is a copy-on-write clone of your database at a specific point in time. Each branch has its own connection string and can be modified independently without affecting other branches. This is similar to Git branches but for your database.

Creating a branch

Branches are created through the Yboard dashboard or API:
  • From the dashboard — Use the Database section of your app to create a new branch from an existing one.
  • Via the CLI — Running yboard init creates your first database branch automatically.
  • Via the API — Call the createBranch action with a project ID, branch name, and parent branch ID.
Branch creation runs as an asynchronous workflow. You can optionally specify a commitHash to branch from a specific point in time.

Branch limits

Each organization has a branch limit based on their subscription: The default maximum is 25 branches per organization. Creating a branch when at the limit returns an error. Check your current usage from the dashboard or via the getBranchUsage action.

Deleting a branch

Remove branches you no longer need to stay within your limits:
  • Dashboard — Navigate to the branch and click Delete.
  • API — Call deleteBranch with the project ID and branch ID.
Deleting a branch is permanent and cannot be undone.

Executing SQL

You can run SQL statements against any branch:
SQL is executed as a transaction — all statements succeed or all are rolled back.

Schema migrations

Yboard can generate and run schema migrations between branches using AI:
  1. Diff detection — Compares schemas between a source branch and a target branch.
  2. Migration generation — Uses AI to generate idempotent SQL migration statements (with CREATE IF NOT EXISTS, DROP IF EXISTS, etc.).
  3. Execution — Runs the generated statements against the target branch.
  4. Error recovery — If a migration fails, AI analyzes the error and generates fix statements.
This powers the preview deployment workflow: when you deploy a preview, Yboard automatically migrates the preview branch’s schema to match your development branch.

Inspecting your database

From the Database Viewer in the dashboard, you can:
  • Browse tables and their schemas.
  • View row data with pagination.
  • Inspect triggers and functions.
  • See connection details (Project ID, Branch ID, connection URLs).

Database quotas

Resource usage is tracked per organization and enforced based on your subscription: Free-tier users receive a fraction of the subscribed quotas (scaled by a 0.2x factor). See Account & Subscriptions for plan-specific limits.

Overuse pricing

If you exceed your plan’s included quotas: