DbState
Menu

Git-native database state management

Database state, versioned in Git.

Compare PostgreSQL databases with the state defined in your Git repository. Review differences, version database objects and reference data, and generate release SQL without automatically applying it.

No direct database apply. No hidden migrations. No automatic Git commits.

Database change problem

Your database is part of the application, but it rarely gets the same review discipline.

Application code usually moves through a clear repository review path. Database state is often split across running databases, migration folders, manual scripts, admin tools, one-off production patches, and undocumented operational changes.

Application code workflow

repository centered

01

Change files

02

Review diff

03

Release artifact

Database state workflow

often fragmented

Running databases

Migration folders

Manual scripts

Admin tools

One-off production patches

Undocumented operational changes

Questions DbState helps reviewers answer

Does the database match the repository?

What changed?

Which objects exist only in the database?

What should reviewers inspect before release?

Does reference data still match?

Product model

DbState turns database state into reviewable repository files.

DbState inspects PostgreSQL, writes durable database object files to your repository, compares repository state with database state, and generates review-only release artifacts for human review.

Database to Repository

repository file writes

Capture selected database state into repository-managed files.

database
read
repository
write files

Repository to Database

review only

Compare desired state with a target database and prepare review-only release artifacts.

comparison
read only
database
not mutated

Operation boundaries

Database writes

Not performed by DbState

Repository file writes

Used during capture

Comparison

Read-only inspection

Release artifacts

Generated for review

Workflow overview

Four workflows across schema and reference data.

DbState models database state by state type and direction. Database to Repository workflows write approved repository files. Repository to Database workflows compare desired state with PostgreSQL and prepare review-only output.

State type

Schema

Database to Repository

Schema Compare: Database to Repository

write repository files
Source
PostgreSQL database
Target
Git repository

Purpose

Inspect supported PostgreSQL objects and write selected objects into durable repository files.

Output

Repository-managed database object files

Safety boundary

Repository file writes only. No database mutation. No automatic Git operations.

Repository to Database

Schema Compare: Repository to Database

read-only compare
Source
Git repository desired state
Target
PostgreSQL database

Purpose

Compare repository-managed objects against a target PostgreSQL database, inspect differences, build a release plan, and generate supported review-only SQL artifacts.

Output

Comparison results and review-only release artifacts

Safety boundary

Read-only database comparison. No direct apply. No generated SQL execution.

State type

Reference data

Database to Repository

Reference Data Compare: Database to Repository

write repository files
Source
PostgreSQL database
Target
Git repository

Purpose

Choose reference-data tables, define key, versioned, ignored, and masked columns, preview generated YAML, and write approved files into the repository.

Output

Reference-data configuration and YAML files

Safety boundary

Typed confirmation for repository writes. No database mutation. No automatic Git operations.

Repository to Database

Reference Data Compare: Repository to Database

read-only compare
Source
Repository-managed YAML
Target
PostgreSQL database

Purpose

Compare repository-managed reference-data rows against PostgreSQL and inspect repository-only, database-only, different, and in-sync rows.

Output

Row-level Data Diff

Safety boundary

Read-only comparison. No INSERT, UPDATE, DELETE, MERGE, or direct data apply in the current Private Beta scope.

Product interface

See the database state before you change it.

DbState presents schema objects, reference-data rows, and release candidates as explicit comparison states that teams can inspect before database execution occurs outside DbState.

DbState Schema Compare results grid showing the public.actor table as repoDifferent and several PostgreSQL tables as databaseOnly.

Schema Compare

Compare repository desired state with a target PostgreSQL database and identify different, database-only, repository-only, and in-sync objects.

Open full-size Schema Compare screenshot
DbState Object Diff screen comparing repository and database DDL for public.actor, with the repository-only dbstate_demo_note text column visible.

Object Diff

Inspect repository and database definitions for a selected object before deciding how to handle the difference.

Open full-size Object Diff screenshot
DbState Data Diff screen for public.country showing row counts for similar, different, repositoryOnly, and databaseOnly states.

Reference Data Diff

Review repository-only, database-only, different, and in-sync reference-data rows.

Open full-size Reference Data Diff screenshot
DbState Release Plan screen showing selected schema release candidates, manual review labels, and review-only candidate explanations.

Release Plan

Select supported release candidates and review the planned handoff before any database execution occurs outside DbState.

Open full-size Release Plan screenshot

Screenshots show real DbState Private Beta workflows captured with a local Pagila PostgreSQL database and a local Git-managed desired-state repository.

Review-first safety

Review-first by design.

DbState helps teams understand and prepare database changes. It inspects, compares, writes explicitly approved repository files, and generates review-only artifacts, but it does not directly execute database changes.

Boundary 01

Database execution stays outside DbState

controlled handoff

DbState does not directly apply generated SQL or execute generated release artifacts.

Users review and execute approved SQL using their normal database release process outside DbState.

Boundary 02

Destructive changes remain manual-review cases

manual review

Destructive SQL is not generated by default, and database-only or changed objects may remain manual-review cases.

DbState avoids pretending that every database difference can be safely automated.

Boundary 03

Repository and Git changes remain explicit

user remains in control

Repository file writes occur only through explicit user workflows.

DbState does not automatically add, commit, push, pull, fetch, or tag. The user retains control of Git history and release handoff.

PostgreSQL scope

Built for real PostgreSQL schemas.

DbState Private Beta covers more than tables and columns. It understands a meaningful set of PostgreSQL object types needed for application and database engineering workflows.

Private Beta starts with PostgreSQLlocal Git workflow

The database-state model is designed to expand to additional relational database engines over time.

Structure

  • Schemas
  • Extensions
  • Enums
  • Sequences
  • Tables
  • Indexes

Query and derived objects

  • Views
  • Materialized views

Constraints

  • Primary keys
  • Unique constraints
  • Foreign keys
  • Check constraints

Programmability

  • Regular functions
  • Triggers

Security

  • Grants
  • Row-level security policiesRLS policies

Data

  • Reference data

Intended users

For teams that need database discipline.

DbState is designed for technical teams that already manage PostgreSQL schema or reference-data changes and want those changes to be easier to inspect through Git-based review.

Role

Application developers

Current problem

Review database structure and reference-data changes beside application code.

How DbState helps

Repository-managed database state makes changes easier to inspect, discuss, and include in pull-request workflows.

Role

Database engineers

Current problem

Understand exactly how a target PostgreSQL database differs from repository desired state.

How DbState helps

Object Diff, Data Diff, and explicit state classifications expose missing, different, database-only, and in-sync state.

Role

Technical leads

Current problem

Reduce dependence on undocumented manual database changes and one-off release scripts.

How DbState helps

Review plans and repository state provide a clearer handoff between development, review, and database execution.

Role

Regulated or audit-sensitive teams

Current problem

Preserve clearer evidence of intended database state and reviewed release artifacts.

How DbState helps

Git-managed files and review-only artifacts improve traceability without claiming regulatory compliance certification.

Private Beta

Join the DbState Private Beta.

DbState Private Beta is currently focused on PostgreSQL and local Git-based workflows. Participants receive early access to the Windows build and can help shape the product before broader release.

Private Beta is intended for developers, database engineers, and technical teams actively managing PostgreSQL schema or reference-data changes through Git.

Team collaboration, hosted workflows, and server-based deployment are not part of the current Private Beta.