---
title: "Lakebase and Agentic SDLC: Branching Databases for Coding Agents"
description: "Coding agents working in parallel on shared databases create schema conflicts, test interference, and data exposure risks. Lakebase Postgres solves this with database branching, which creates an isolated copy of an entire database in under a second using copy-on-write. Each agent gets its own database branch via a post-checkout Git hook tied to a worktree, and each pull request gets an ephemeral branch through CI tooling. Schema changes are tracked in code with migration tools such as Drizzle or Alembic and promoted to the parent branch during deployment, not by merging database branches. Idle branches scale to zero, so running many concurrent agents incurs no compute cost for unused branches."
---

# Lakebase and Agentic SDLC: Branching Databases for Coding Agents

[Databricks](https://yomu.fyi/company/databricks) · Thibaut Gourdel · Oct 9, 2026

**Type:** Problem & solution

## Summary

Coding agents working in parallel on shared databases create schema conflicts, test interference, and data exposure risks. Lakebase Postgres solves this with database branching, which creates an isolated copy of an entire database in under a second using copy-on-write. Each agent gets its own database branch via a post-checkout Git hook tied to a worktree, and each pull request gets an ephemeral branch through CI tooling. Schema changes are tracked in code with migration tools such as Drizzle or Alembic and promoted to the parent branch during deployment, not by merging database branches. Idle branches scale to zero, so running many concurrent agents incurs no compute cost for unused branches.

## Context

Coding agents working in parallel on shared databases cause schema conflicts, test interference, and data exposure risks. Traditional single-development-database setups cannot safely isolate concurrent agent activity.

## Approach / What changed

Lakebase Postgres uses copy-on-write database branching to give each coding agent and pull request an isolated, ephemeral database. A post-checkout Git hook creates a database branch per worktree; CI tooling (GitHub Actions) creates a branch per PR. Schema changes are tracked in code via migration tools (Drizzle, Flyway, Liquibase, Alembic) and promoted to the parent branch through deployments, not by merging database branches.

## Takeaways

- Database branching gives each coding agent an isolated, ephemeral database, preventing schema conflicts and test interference when agents run in parallel.
- Lakebase branches use copy-on-write and scale to zero when idle, so running many concurrent agents does not consume extra storage or compute for unused branches.
- Schema changes are tracked in code via migration tools (Drizzle, Flyway, Liquibase, Alembic) and promoted to the parent branch through deployment, not by merging database branches.

## FAQ

### How are database branches merged back?

Lakebase branches are not merged back to the parent branch because both parent and child can change independently, making data reconciliation impractical. Instead, schema changes are tracked in code as migrations and applied to the parent branch during deployment.

### Do database branches consume full storage per branch?

Yes. Lakebase branches use copy-on-write, so they share the parent branch's data and only consume additional storage as they diverge. Idle branches scale to zero, incurring no compute cost, which is important when running many agents simultaneously.

### How are environments and sensitive data handled?

A common setup uses one Databricks workspace per environment (dev, staging, prod) for security and compliance. Branching from a seeded database instead of production is also common to avoid exposing sensitive data like PII.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [CI/CD](https://yomu.fyi/topic/ci-cd), [Database](https://yomu.fyi/topic/database), [Git](https://yomu.fyi/topic/git), [Postgres](https://yomu.fyi/topic/postgres)

- Source: [Databricks](https://www.databricks.com/blog/lakebase-and-agentic-sdlc-branching-databases-coding-agents)
- Source URL: https://www.databricks.com/blog/lakebase-and-agentic-sdlc-branching-databases-coding-agents
- Ingested by Yomu: 2026-10-09T00:00:18.284Z

[Read original post](https://www.databricks.com/blog/lakebase-and-agentic-sdlc-branching-databases-coding-agents)
