Skip to main content

PostgreSQL schema evolution with built-in multi-agent coordination ๐Ÿ“

Project description

Confiture ๐Ÿ“

PostgreSQL migrations with multi-agent coordination, timestamp-based versioning, and 4 flexible strategies

Build fresh databases in <1 second. Zero-downtime migrations. Multi-agent conflict detection. No merge conflicts (timestamp-based versioning). Production data sync with PII anonymization.

PyPI Tests Python 3.11+ PostgreSQL 12+ License: MIT


Why Confiture?

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.


Quick Start

Installation

pip install fraiseql-confiture

# Recommended: include pglast for large-schema support
# (uses PostgreSQL's own C parser โ€” no token limits, handles schemas with bulk seed data)
pip install "fraiseql-confiture[ast]"

Basic Usage

# 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

Team Workflow (Multi-Agent)

# 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

Core Features

๐Ÿ› ๏ธ Four Migration Strategies

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

๐Ÿค Multi-Agent Coordination

  • โœ… Automatic conflict detection
  • โœ… Intent registration and tracking
  • โœ… JSON output for CI/CD
  • โœ… <10ms per operation

๐ŸŒฑ Seed Data Management

  • โœ… 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

๐Ÿ” Git-Aware Validation

  • โœ… Detect schema drift vs. main branch
  • โœ… Enforce migrations for DDL changes
  • โœ… Pre-commit hook support

๐Ÿ”ง Developer Experience

  • โœ… Dry-run mode (analyze before applying)
  • โœ… Migration hooks (pre/post)
  • โœ… Schema linting
  • โœ… PII anonymization
  • โœ… Optional Rust extension
  • โœ… Python 3.11, 3.12, 3.13

Documentation

Getting Started: docs/getting-started.md

Guides:

API Reference: docs/reference/

Examples: examples/


Project Status

โœ… 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

โš ๏ธ Beta Software: All features implemented and tested, but not yet used in production. Use in staging/development first.


Contributing

git clone https://github.com/fraiseql/confiture.git
cd confiture
uv sync --all-extras
uv run pytest

See CONTRIBUTING.md and CLAUDE.md.


Author & License

Vibe-engineered by Lionel Hamayon ๐Ÿ“

MIT License - Copyright (c) 2025 Lionel Hamayon


Making jam from strawberries, one migration at a time. ๐Ÿ“โ†’๐Ÿฏ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fraiseql_confiture-0.8.3.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fraiseql_confiture-0.8.3-cp314-cp314-win_amd64.whl (707.8 kB view details)

Uploaded CPython 3.14Windows x86-64

fraiseql_confiture-0.8.3-cp313-cp313-win_amd64.whl (707.8 kB view details)

Uploaded CPython 3.13Windows x86-64

fraiseql_confiture-0.8.3-cp313-cp313-manylinux_2_28_x86_64.whl (799.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.8.3-cp313-cp313-macosx_11_0_arm64.whl (753.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fraiseql_confiture-0.8.3-cp312-cp312-win_amd64.whl (707.7 kB view details)

Uploaded CPython 3.12Windows x86-64

fraiseql_confiture-0.8.3-cp312-cp312-manylinux_2_28_x86_64.whl (799.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.8.3-cp312-cp312-macosx_11_0_arm64.whl (753.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fraiseql_confiture-0.8.3-cp311-cp311-win_amd64.whl (707.5 kB view details)

Uploaded CPython 3.11Windows x86-64

fraiseql_confiture-0.8.3-cp311-cp311-manylinux_2_28_x86_64.whl (801.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.8.3-cp311-cp311-macosx_11_0_arm64.whl (754.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file fraiseql_confiture-0.8.3.tar.gz.

File metadata

  • Download URL: fraiseql_confiture-0.8.3.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3.tar.gz
Algorithm Hash digest
SHA256 582839d76331fed761a6ba624d18234cb248fe00906c94ca65fe22d5e7406f87
MD5 a06486e518cdf48b13f42fdc807033c9
BLAKE2b-256 b7535f9eb5c79a5664523ed2a0f4da46b4830ce3e2f213b64639930d2c26c9be

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 707.8 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 217b4def4ef23398275a80360b6917829cace267a1d7e49fc6a56be2ef1e838c
MD5 bfa676ef125c293c0f80ff72cced501f
BLAKE2b-256 c4d5e122b5ea1050797ef159a2f76e8b7a446d422ff55c97665de149c19dfefa

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 707.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d36f5c86c239c4f15a7d2bd9b3da019fb576f13fdd328a48aa56a29a11bf00c3
MD5 4ef604048bc2db3719b55f610bd77d64
BLAKE2b-256 33b8e93497e10c58e0118ab8b215f5a3e1248298732c20a2fbd9b821b98e9fd2

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp313-cp313-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 799.8 kB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c21897c658784e4e1c28bfd51c507c5b5380582fb86928f3ef00ed1aadbba4d
MD5 fd0bcbb79d93a095f6af2841cd97da62
BLAKE2b-256 b9d29c8fd4724cbdd54f8f71626e02f984e71bfc0c0de8c27637d1bf39d678da

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 753.9 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1ea98cf0f9a82234105ddf803266ef7cddef49f109b2cd0f312a06c2651df86
MD5 bfbc37496bbe801cade4e705ca3b6f09
BLAKE2b-256 cd4004de33d1cb9c497d0f6bc97cf69e006c66dd54c999ffd785472a533944a2

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 707.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6f820978f422dc393eb62f135eab9ea83df497df6b3cf7ee194fb2a0e0eaa86a
MD5 62d554be9c6cfeb4bb01f41e9264ad66
BLAKE2b-256 ad6611db6b0c50cbfebcb60c085c82be7518e4808cfdcf844cb06dc548f6f1ac

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp312-cp312-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 799.9 kB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc9785de985214d0efb6d1e55992b516ce5145e2607b737182d5fe4d35c81652
MD5 b9fe177643fbb43acbbe8d4424ac8df2
BLAKE2b-256 8417cb54d4e2377da9eb0260da349cca1bbb6ca48b20489e9643cdc8adbd7270

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 753.8 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4de9777d8aa4365861c490a3b57ffb46120bf2cb0dae40b690a24c6f54cd1508
MD5 33b1323528d4e62876af74e01817bea9
BLAKE2b-256 5a9398dba0b501e8f83b52b20cccc4fd8559d00cd9d3eb2c8b63a7b068232a49

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 707.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2e7f1522ea89aeec83b195bb303e97895f33cd05070babf945c1c89d5d28e89f
MD5 0f371fe06622761556808e560df3b552
BLAKE2b-256 6ad0e50127a7aa1443aacc52981392ca61edc0b5b44743e46f1052329dad087c

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp311-cp311-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 801.4 kB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0b94194fa4d8dab164ceeb44b275b683068a0f73b0b6ce027702a32b79fb146
MD5 c5cdb92cb0b9e7a0c004e6ad7e519552
BLAKE2b-256 e01a12f4f02e5257da00294f42fa40dd9cc5d98e655a6788ad4aa74097ecfbf2

See more details on using hashes here.

File details

Details for the file fraiseql_confiture-0.8.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fraiseql_confiture-0.8.3-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 754.2 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fraiseql_confiture-0.8.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a40c8cf8d0e70f7c83d0602e08ab57ca47b25bc15747df7f76285889672c8b5f
MD5 45afadeb7e08026a8aae7e99ff935a88
BLAKE2b-256 ba672d69791f7f169c22737fe0591ceb0fd4a3614569dbbfa3d1941e234651d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page