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.1.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.1-cp314-cp314-win_amd64.whl (626.9 kB view details)

Uploaded CPython 3.14Windows x86-64

fraiseql_confiture-0.4.1-cp313-cp313-win_amd64.whl (626.9 kB view details)

Uploaded CPython 3.13Windows x86-64

fraiseql_confiture-0.4.1-cp313-cp313-manylinux_2_28_x86_64.whl (711.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (673.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fraiseql_confiture-0.4.1-cp312-cp312-win_amd64.whl (626.9 kB view details)

Uploaded CPython 3.12Windows x86-64

fraiseql_confiture-0.4.1-cp312-cp312-manylinux_2_28_x86_64.whl (712.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (673.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fraiseql_confiture-0.4.1-cp311-cp311-win_amd64.whl (626.7 kB view details)

Uploaded CPython 3.11Windows x86-64

fraiseql_confiture-0.4.1-cp311-cp311-manylinux_2_28_x86_64.whl (713.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fraiseql_confiture-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (674.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.tar.gz
Algorithm Hash digest
SHA256 aa9e62746856c8c7e80599dcf1d6966c9c77189534fce2a34f9ca4c84f25652e
MD5 0f12d64ee6c1e804bdb7397e913e72e2
BLAKE2b-256 11bc3998c347141919a06f76dc8db1dd49bbfb20b3b0dd1b63ecc17d0557e212

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 626.9 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7b5bac55afb66134c74841790d0475af147f084ab297dd5f97bade9b8cf12f53
MD5 d3bfd5776962d401f2d999afc46b060e
BLAKE2b-256 c7a874c3c09ba6947cd890d29c85037417502ae8db50936a411da7ff1e8b50dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 626.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cdf9ffef0cf5e018f51eca089a58b4f2c6cf5f596a25c88a7f012eda2a8ee549
MD5 d355476630dc345cc73089768fd78fe1
BLAKE2b-256 5c697860f4cef8945a6bde7ad8f6303dc635a05cd047e74d2091f5112f4526b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp313-cp313-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 711.9 kB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fdc9885965601c57d6e1a9765293ba52ced165bd646a5c228d72933f9b94feb7
MD5 ab91799773ff77f8701bfd952de134d3
BLAKE2b-256 a35ced17fa4d9078b32cd70be27d3c00f561bb8980f3dfced6bb5219abb80620

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 673.9 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc16594246f07d5a5c70b46e396e78048ba9059b27928c096c8d5a10f732cc51
MD5 635db12c764860301da96f026c94e687
BLAKE2b-256 659f5cec9a9ff141ffd78bc7c0b479c0b41f429b5ec4a5f9cd706e3a6767f813

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 626.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3befd885f47e42e1f3c3671ab86330865639c39a783ac5c355bccc80b8781a54
MD5 7db8905377932921f315f71d1a054e34
BLAKE2b-256 fe25db2892d1d59cdf208da09404e773aea0f114fa7a84e671b2b659feb79f11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp312-cp312-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 712.0 kB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2de5cf62d3d569f93864863a85bbd256c7a09d4059913a9bcdee5687d9320512
MD5 2c6681dd820e2b835f3dfbca107ddb5a
BLAKE2b-256 2a8e6581f4863da5b299915a2f135cdb8a1078cf366fa4041aa2dcc564b87276

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 673.9 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2d7976767803068ca2e75b4272993c9288cf60a0d8459edaef53560d47249bc
MD5 c052876979e725fbfbd188db147c2118
BLAKE2b-256 c0b1b04d16a8a24c02427e630f132d34ce8030bc87d794e647715727d964844b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 626.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2d077db1eea160fe7f7055c22dd73d8468cb6f684449ce566df286d1c1a36f41
MD5 629e5c4618e2155fbfe090acb4ea4f36
BLAKE2b-256 e814f9c84d83c81e2cc0d467141aa159a6c061297786c3d10ab807c44fb6e202

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp311-cp311-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 713.5 kB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cb182de7ad72c4ca9a22fe2ca643f86822ada2af95c21b01ddca589926d6f2b7
MD5 7bb273730779020e21b86757ee766cb6
BLAKE2b-256 045b37ec9e49d4a16e29a1a4d3f11ef0e2dda1cfbb5d7057fe221bf32f51c421

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fraiseql_confiture-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 674.1 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3157ee8dc584219bd19b4b7bc76e50d085273f9cb945c20df1c644c60e179813
MD5 0dd4831d5f83fbcb6647d0d14f3b719a
BLAKE2b-256 72d86dd5e79bb5f59a0e14604e721664bf27a19be64116f423c08e93e6295195

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