Skip to main content

Tutorial: Batch Change with Database Group

Bytebase allows you to change a collection of databases in a single workflow. These databases usually have a homogenous structure while belonging to different development environments, geographic locations, SaaS tenants, data centers or data partitions. A Plan records the proposed changes and targets, its Issue records review, and its Rollout tracks execution across databases.

Change databases from multiple environments

A development pipeline usually consists of multiple environments. Each environment has its isolated database to store the respective data. A schema change will be propagated from each database following the development pipeline. You may have multiple databases in one stage as well. In Bytebase, you can select multiple databases from different environments to apply the database change. bb-db-edit-schema The Plan tracks the multi-database change, with execution organized into environment stages in its Rollout. You may deploy changes one database after another or batch deploy databases at the same stage.

Database group

Database groups allow you to manage and batch change multiple databases together. This is particularly useful for SaaS multi-tenant architectures, geographic deployments, or database partitioning scenarios.

Database Group Configuration

Learn how to create and manage database groups

Batch change databases in a group

  1. Within the project, click Database > Groups on the left-side bar. Click Edit Schema, choose Database Group, select the database group you’ll operate and click Next. bb-db-group-edit
  2. A Plan with the selected databases will be previewed. Add the SQL and click Create to save a draft Plan and its linked draft Issue. Inspect the checks, then submit with Ready for Review as described in Plan authoring. bb-issue-batch-created