Skip to main content

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

Project description

Confiture ๐Ÿ“

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.

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

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.4.0.tar.gz (1.2 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.4.0-cp314-cp314-win_amd64.whl (625.8 kB view details)

Uploaded CPython 3.14Windows x86-64

fraiseql_confiture-0.4.0-cp313-cp313-win_amd64.whl (625.8 kB view details)

Uploaded CPython 3.13Windows x86-64

fraiseql_confiture-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl (710.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (672.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fraiseql_confiture-0.4.0-cp312-cp312-win_amd64.whl (625.8 kB view details)

Uploaded CPython 3.12Windows x86-64

fraiseql_confiture-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl (710.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (672.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fraiseql_confiture-0.4.0-cp311-cp311-win_amd64.whl (625.6 kB view details)

Uploaded CPython 3.11Windows x86-64

fraiseql_confiture-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl (712.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (673.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0.tar.gz
Algorithm Hash digest
SHA256 913b72dfc0f9214653ef39cc946b31b60e4ca89bfba4cd98b76dc46eae781bb4
MD5 67e4b0bec597c815396777c2fdf9e412
BLAKE2b-256 a3e56d2f6e3adcec5c90360154d3758865b302b6af6892f1547b70602c4fac19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 625.8 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7331756750b56dfd77b140ecb3f9954e5b10f30e141fbec6b360e025efb4fe58
MD5 eb9e960f0fc5bc6877ffa110b955edd6
BLAKE2b-256 0b769aa6f04c789c9e9368f25fe272294129ab790e9618b0e04a34b4d841e649

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 625.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2aceff85f5af19c06488859466a321c02a1a3b4a7a1eba648d0b7b1a2dd42e8d
MD5 756d1c97b672b34bc7d5c843ebeb0496
BLAKE2b-256 5ca71d4fe42774c45008cf8ff4184696fb02d67a719002410d6226c7fbde9248

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 710.8 kB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25ac4cc77aaca408b6fc28d4d44d96f7d870fd162b691fc20ecad6f69abde406
MD5 a549593b9f475e0d278b4b3879a97029
BLAKE2b-256 5a52564bd622b540cc1d72aedf7d4e07797ffc6d6af590a7ce1daf7653110174

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 672.8 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3e2732f9ca06847fe557ffe3b2f442b72937dea83d1b6410c3a96d31a4d8fcb
MD5 7a27426224216b1063612795e9930a4d
BLAKE2b-256 42ca5aa462299cd77390f179ae18e16e69c76bdaa4c2f91f677f0252235bfd3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 625.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 27bd1b6403846e78e693e8bc1e596761e990f12a041f92ed5f5b16efcd802171
MD5 33c5ab566dd55b9b8a628789251002ad
BLAKE2b-256 bd1534780e95940b6b8749ee748843b2f98a4b5fd77f7f06d00e6edf0e1b7dd8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 710.8 kB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 339a2a6725c81c6dad2241421a1753a4b0d3d4c5fe19e35fdb74a8204cae49fc
MD5 c3d1e1e25ec4bcc88285cd12cf105766
BLAKE2b-256 acd646f4fd012de5675db9f0b370c183f90fa40ad9699ac5ad9db9ba84d1bbd7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 672.7 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 555cd3bb105eeb1d85b32aec22612c695b922e3ecb81cca1ecc66aeb81315652
MD5 3f1a3e3edf8eff091f2647410c146a09
BLAKE2b-256 eafdd3095e9d54bec392c96e28fa982a81fe5c733a19074446f77bb0f714bf88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 625.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e3bb5195bebc700937f0380e7c6f955147bda58c0659adf1d03a71668156c1d9
MD5 42e82d0ebd485b06a56f921150ca0bb8
BLAKE2b-256 7a5437d4341aa672d9d9518c41aa800a5c28af88cab3df83e403a71db652e0df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 712.3 kB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 30c324a455ffb555d7bbf57e11be290ae70cc6b205a4f2fa94d917650d3a1c40
MD5 cf83e2f65cea5aa03ce24a954a577a3d
BLAKE2b-256 87df75bd276e1c1791a09ff9ec0dd44a3dfa8bacd653366dda040d69e23e1122

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 673.0 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 439e2246dab64cfd2f6a661f8e0008e1f08e954ad8a8b47c59996e0350e60442
MD5 74751c23020551789c760aea4fda5d9a
BLAKE2b-256 1562f06147d41fd6da97ff8db595693a885beab8cc1fb2b2f0903b93902dc6da

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