Skip to main content
CommunityCloudEnterprise

Branches

A branch represents a divergent state of the NetBox database, isolated within a dedicated PostgreSQL schema. Changes made within a branch do not affect main (or any other branch) until the branch is merged.

Fields

Name

The branch's unique name.

Description

An optional short description of the branch.

Owner

The NetBox user who created the branch. This value may be null if the owning user account has since been deleted.

Schema ID

The unique, randomly-generated identifier of the PostgreSQL schema which houses the branch in the database. This is an eight-character alphanumeric string and is generated automatically when the branch is created. The full schema name is the schema_id prepended with the configured schema_prefix.

Status

The current status of the branch. This must be one of the following values:

StatusDescription
NewThe branch has been created but is not yet provisioned in the database
ProvisioningA job is running to provision the branch's PostgreSQL schema
ReadyThe branch is healthy and available for use
SyncingA job is running to synchronize changes from main into the branch
MigratingA job is running to apply database migrations to the branch schema
MergingA job is running to merge changes from the branch into main
RevertingA job is running to revert previously merged changes from this branch
Pending MigrationsOne or more database migrations must be applied before the branch can be used
MergedThe branch's changes have been successfully merged into main
ArchivedA merged branch whose PostgreSQL schema has been deprovisioned to reclaim space
FailedAn operation against this branch (typically provisioning or migration) has failed

Applied Migrations

A list of database migrations which have been applied to the branch since it was created. This is used to keep track of which migrations a branch has seen so that historical data can be migrated forward when the branch is synced, merged, or reverted.

Last Sync

The time at which this branch was most recently synchronized with main. This value will be null if the branch has never been synchronized.

tip

Reference the synced_time attribute on a branch to return either the branch's last_sync time or, if null, its creation time.

Merge Strategy

The strategy used to merge changes from the branch into main. This is set when the branch is merged and cleared when the branch is reverted. The available strategies are:

StrategyDescription
IterativeReplays every ObjectChange from the branch onto main in chronological order
SquashCollapses all changes to each object into a single net operation before applying it

See Syncing & Merging Changes for guidance on choosing a strategy.

Merged Time

The time at which the branch was merged into main. This value will be null if the branch has not been merged (or if a previous merge has since been reverted).

Merged By

The NetBox user who merged the branch. This value will be null if the branch has not been merged. It may also be null if the user account has been deleted since the branch was merged.

Comments

Long-form Markdown-formatted comments associated with the branch. (Inherited from PrimaryModel.)

Tags

NetBox tags associated with the branch. (Inherited from PrimaryModel.)