Migration review
Review a development branch before merging
Neon · Const
Neon Schema Diff compares the SQL schemas of two branches and displays their differences side by side. It is available in the Console, CLI, API, and GitHub Actions workflows.
Schema Diff generates a side-by-side comparison of the SQL schemas from two Neon branches. You can use it from the Console to compare a child branch with its parent or to compare branches selected during an instant restore; the same capability is also available through the CLI and API.
neon branches schema-diff [options]A visual or programmatically retrievable comparison of the SQL schemas for two Neon branches.
neon branches schema-diff --project-id "$NEON_PROJECT_ID" --branch-id "$FEATURE_BRANCH_ID" --compare-branch-id "$PRODUCTION_BRANCH_ID"Run the Neon CLI comparison to inspect the feature branch schema against production.
Review a development branch before merging
Check a child branch against its parent
Validate branch state before restoring
Retrieve differences in an automated workflow
Schema Diff compares the SQL schemas of two selected Neon branches and presents their differences in a side-by-side view. In the Console, it can compare a child branch with its parent or branches chosen during an instant restore.
Follow-up: How can the comparison be automated? Use the Neon CLI command or the compare_schema API endpoint to retrieve or inspect the branch differences programmatically.
Open Schema Diff from the Branches page for a branch's detailed view, or from the Restore page. Select the relevant database and branches, then start the comparison.
Follow-up: What should be checked before comparing? Confirm that the intended branches and database are selected, especially when working from the Restore page.
The compare_schema endpoint lets AI agents retrieve schema differences by comparing two Neon branches. The feature is also exposed through the Neon CLI.
Follow-up: Which CLI workflow corresponds to this capability? The documented CLI entry point is neon branches schema-diff, which compares branch schemas outside the Console.
neon branches schema-diffcompare_schemaNeon ConsoleBranches pageRestore pageSchema Diff GitHub Action