PostgreSQL migrations with multi-agent coordination and 4 flexible strategies
Build fresh databases in <1 second. Zero-downtime migrations. Multi-agent conflict detection. Production data sync with PII anonymization.
Problem: Traditional migration tools replay every migration on every build (slow, brittle, maintains technical debt).
Solution: DDL files are the single source of truth. Just execute your schema once. Fresh databases in <1 second.
Multi-Agent Safe: Automatic conflict detection prevents teams and agents from stepping on each other.
pip install fraiseql-confiture# Initialize project
confiture init
# Write schema DDL files
vim db/schema/10_tables/users.sql
# Build database (<1 second)
confiture build --env local
# Generate and apply migrations
confiture migrate generate --name "add_bio"
confiture migrate up# Register intention before making changes
confiture coordinate register --agent-id alice --tables-affected users
# Check for conflicts (by other agent)
confiture coordinate check --agent-id bob --tables-affected users
# ⚠️ Conflict: alice is working on 'users'
# Complete when done
confiture coordinate complete --intent-id int_abc123| Strategy | Use Case | Command |
|---|---|---|
| Build from DDL | Fresh DBs, testing | confiture build --env local |
| Incremental | Existing databases | confiture migrate up |
| Production Sync | Copy prod data (with anonymization) | confiture sync --from production --anonymize users.email |
| Zero-Downtime | Complex migrations via FDW | confiture migrate schema-to-schema |
- ✅ Automatic conflict detection
- ✅ Intent registration and tracking
- ✅ JSON output for CI/CD
- ✅ <10ms per operation
- ✅ Sequential execution (solves PostgreSQL parser limits on 650+ row files)
- ✅ Per-file savepoint isolation for error recovery
- ✅ Continue-on-error mode (skip failed files)
- ✅ Prep-seed validation (5-level orchestrator)
- ✅ 5-level validation (static → full execution)
- ✅ Catch NULL FKs before production
- ✅ Pre-commit safe (Levels 1-3)
- ✅ Database validation with SAVEPOINT safety
- ✅ Detect schema drift vs. main branch
- ✅ Enforce migrations for DDL changes
- ✅ Pre-commit hook support
- ✅ Dry-run mode (analyze before applying)
- ✅ Migration hooks (pre/post)
- ✅ Schema linting
- ✅ PII anonymization
- ✅ Optional Rust extension
- ✅ Python 3.11, 3.12, 3.13
Getting Started: docs/getting-started.md
Guides:
- Build from DDL
- Incremental Migrations
- Production Data Sync
- Zero-Downtime Migrations
- Sequential Seed Execution ⭐ NEW
- Multi-Agent Coordination
- Prep-Seed Validation
- Migration Decision Tree
- Dry-Run Mode
API Reference: docs/reference/
Examples: examples/
✅ v0.4.0 (February 4, 2026) - RELEASED
Phase 9 Addition (v0.4.0):
- ✅ Sequential seed execution (solves PostgreSQL parser limits on 650+ row files)
- ✅ Per-file savepoint isolation for error recovery
- ✅ Continue-on-error mode for partial seeding
- ✅ 29 new tests for seed workflow
- ✅ Comprehensive documentation with 8 examples
- ✅ Real database integration testing
What's Implemented:
- ✅ All 4 migration strategies
- ✅ Sequential seed execution with savepoints (NEW in v0.4.0)
- ✅ Multi-agent coordination (production-ready, 123+ tests)
- ✅ Prep-seed validation (5 levels, 98+ tests)
- ✅ Git-aware schema validation
- ✅ Schema diff detection
- ✅ CLI with rich output
- ✅ Comprehensive tests (4,100+)
- ✅ Complete documentation
git clone https://github.com/fraiseql/confiture.git
cd confiture
uv sync --all-extras
uv run pytestSee CONTRIBUTING.md and CLAUDE.md.
Vibe-engineered by Lionel Hamayon 🍓
MIT License - Copyright (c) 2025 Lionel Hamayon
Making jam from strawberries, one migration at a time. 🍓→🍯