diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b90c9..c94c0e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [1.7.2] - 2026-06-08 +- Fix: Use PEP 621 [project] table for PyPI metadata (homepage, repository, bug tracker) + +## [1.7.1] - 2026-06-08 +- Fix: Update PyPI homepage and repository URLs to postgresql-tools/migra + ## [1.6.0] — 2026-06-04 ### Added diff --git a/PROJECT_PLAN.md b/PROJECT_PLAN.md index 342810e..dc8ed1b 100644 --- a/PROJECT_PLAN.md +++ b/PROJECT_PLAN.md @@ -1,352 +1,338 @@ -# MigraDiff — Project Plan +# MigraDiff Project Plan (Updated) -**Project:** MigraDiff (fork of djrobstep/migra) -**Package:** `migradiff` (PyPI) · CLI command: `migra` -**License:** MIT -**Repository:** https://github.com/migradiff/migra -**Maintainer:** Leo (Roongrunchai Chongolnee) · leo@lateos.ai -**Parent company:** Lateos (lateos.ai) -**Current version:** 1.4.0 -**Last updated:** June 1, 2026 +## Project Overview ---- +**MigraDiff** is an actively maintained fork of djrobstep/migra (PostgreSQL schema diff tool). -## 1. Executive Summary +- **Package:** `migradiff` (PyPI) +- **CLI:** `migra` (backward compatible) +- **Repo:** https://github.com/postgresql-tools/migra +- **Maintainer:** Leo (Lateos) +- **License:** MIT -MigraDiff is the actively maintained fork of `djrobstep/migra`, the -PostgreSQL schema diff tool deprecated in 2024. It compares two -PostgreSQL schemas and generates the SQL migration script needed to -transform one into the other. +--- -The fork fixes known upstream issues, adds Python 3.12+ support, and -extends the tool with a complete AI-powered migration assistant suite -(explain, rollback, advise, generate). The CLI command remains `migra` -for backward compatibility; the PyPI package is `migradiff`. +## Business Targets -MigraDiff is positioned for acquisition by Supabase or Redgate within -2–3 years at $10–20M, built on $1–2M ARR from 200–300 paying customers. +| Metric | Target | Timeline | +|--------|--------|----------| +| **Revenue (ARR)** | $1–2M | Year 1 | +| **Customer Base** | 200–300 customers | Year 1 | +| **Exit** | Supabase/Redgate | Year 2–3 | +| **Exit Value** | $10–20M | Year 2–3 | --- -## 2. Current State (v1.4.0) - -- 175 tests passing, 2 skipped, 0 failing -- flake8: 0 warnings -- black: clean -- Python 3.10+ required, PostgreSQL 12+ -- Docker image: `ghcr.io/migradiff/migra` -- GitHub Action: `migradiff/migra-action` -- Pre-commit hook available -- AI features: `pip install migradiff[ai]` (optional, uses user's - own Anthropic API key — no MigraDiff infrastructure required) - -### Shipped Features - -**Core diff engine (inherited + improved):** -- Tables, columns, constraints, indexes -- Views and materialized views -- Functions and stored procedures -- Sequences, enums, composite types, domains -- Row-Level Security (RLS) policies (fixed from upstream) -- Foreign data wrappers -- Column-level privileges -- Partitioned tables - -**Fork additions (deterministic):** -- `--from-file` — diff pg_dump schema files, no live connection needed -- `--from-migrations-dir` — diff against a migrations folder - (Supabase, Flyway, numeric naming) -- `--schema` — comma-separated, cross-schema dependency resolution -- `--output json` — per-statement risk classification -- `--unsafe` — include destructive operations in output -- Python 3.12+ clean (no deprecation warnings) -- Actionable error messages with object name and issue link -- Docker image and GitHub Action -- Pre-commit hook -- Docker Compose dev environment - -**Fork additions (AI suite — v1.3.0–v1.4.0):** -- `--explain` — plain-English migration explanation with risk analysis -- `--rollback` — generates reversal migration SQL -- `--advise` — deterministic + AI performance/risk assessment -- `--generate` — writes migration SQL from plain-English description, - grounded in real schema from live connection or schema file - -**AI safety rules (`--generate`):** -- Hard refuse on bulk destructive descriptions: "drop all", "delete all", - "truncate all", "drop everything", "wipe" -- Soft warn on individual destructive operations: "drop", "delete", - "truncate", "remove table", "remove column" -- All AI output marked as AI-generated in header -- Temperature 0 for determinism (Claude Haiku) -- Combinable with `--advise` for immediate deterministic risk feedback +## Completed Features ---- +### v1.3.0 (Sessions 009–010) +- `--explain`: plain-English explanation of migrations +- `--from-migrations-dir`: load migrations from directory -## 3. Technology Stack +### v1.4.0 (Sessions 011–013) +- `--rollback`: generates reversal migration SQL +- `--advise`: deterministic + AI performance/risk assessment +- `--generate`: writes migration SQL from plain-English description -| Layer | Technology | -|---|---| -| Language | Python 3.10+ | -| Database | PostgreSQL 12+ | -| AI model | Claude Haiku (Anthropic) via `anthropic` package | -| AI dependency | Optional (`migradiff[ai]`), lazy import | -| Distribution | PyPI (`migradiff`), Docker (`ghcr.io/migradiff/migra`) | -| CI | GitHub Actions (`migradiff/migra-action`) | -| Testing | pytest | -| Linting | flake8, black | -| Dev environment | Docker Compose (Postgres 16, trust auth, localhost:5432) | +### v1.5.0 (Session 017) +- `--comment-on`: diffs COMMENT ON annotations on objects ---- +### Infrastructure (Session 018) +- ✅ Production CI/CD pipeline +- ✅ Branch protection on master +- ✅ Automated PyPI releases on tags +- ✅ GitHub Actions workflows (lint + test matrix + coverage) -## 4. Development Session History +--- -Each session follows a tests-first methodology: confirm runtime failures -before implementation, no vibe-coding, explicit stop conditions, flake8 -and black clean on exit. +## Current Version -| Session | Branch | Feature | Tests | Version | -|---|---|---|---|---| -| 001–008 | Various | Fork setup, upstream fixes, RLS, --from-file, --schema, JSON output, Docker, GitHub Action, pre-commit | 109 baseline | v1.0.0–v1.2.0 | -| 009 | feat/session-009-migrations-dir | `--from-migrations-dir` | — | — | -| 010 | feat/session-010-ai-explain | `--explain` (AIExplainer) | 36 | v1.3.0 | -| 011 | feat/session-011-ai-rollback | `--rollback` (AIRollback) | 42 | — | -| 012 | feat/session-012-ai-advise | `--advise` (AIAdvisor) + `classify_statement_risk()` | 33 | — | -| 013 | feat/session-013-ai-generate | `--generate` (AIGenerator) + safety rules | 33 | v1.4.0 | +**v1.5.1** (released June 4, 2026) -**Test totals:** 175 passing, 2 skipped (226 collected including -Postgres-dependent tests). 144 of those are AI suite tests. +Test counts: +- Baseline: 109 tests +- v1.3.0: 142 tests (after --explain) +- v1.4.0: 175 tests (after AI suite) +- v1.5.0: 190 tests (after COMMENT ON) --- -## 5. Feature Roadmap - -### Free Tier — Remaining Sessions +## Free Tier Roadmap -The free tier rule: **if it runs locally on the user's machine with -their own credentials, it's free.** +### Session 019: `--explain-drift` (7–10 days) -| Session | Feature | Description | -|---|---|---| -| 014 | `--explain-drift` | Schema drift detection and explanation between two points in time. One-time local execution is free; managed/scheduled monitoring is enterprise. | -| 015 | `--document` | AI-generated schema documentation. One-time generation is free; continuously updated hosted documentation is enterprise. | -| 016 | pgvector diffing | First-class support for pgvector extension objects in schema diffs. | +**Feature:** Compare two **live PostgreSQL databases** and explain differences. -### Enterprise Tier — Post-Free-Suite +```bash +migra --from-db "postgresql://user:pass@old.example.com/db" \ + --to-db "postgresql://user:pass@prod.example.com/db" \ + --explain-drift +``` -The enterprise rule: **if it requires MigraDiff to host something, -manage something, or store something on the customer's behalf, it's -enterprise.** +**Output:** Human-readable explanation of schema differences with risk categorization (BREAKING/WARNING/INFO). -| Feature | Description | Infrastructure Required | -|---|---|---| -| Shadow Run | Simulate migrations against ephemeral cloned databases; report locking behavior, rewrite risk, and estimated duration at actual data scale. | Firecracker microVMs, ephemeral Postgres instances, `pg_stat_activity` / `pg_locks` profiling | -| Hosted AI key | MigraDiff absorbs Anthropic API cost; customer doesn't need their own key. Usage-metered. | API key management, metering, billing | -| Team RBAC | Role-based access control and multi-stage approval workflows for migrations. | Account management, permissions storage | -| SAML / SSO | Enterprise identity provider integration (SAML 2.0, OIDC). | Identity layer (`python3-saml`, `authlib`) | -| Audit trail dashboard | Hosted dashboard showing migration history, approvals, risk assessments, and compliance evidence. | Data persistence, dashboard hosting | -| PR comment injection | Managed GitHub App that posts migration diffs and risk assessments as PR comments automatically. | GitHub App, webhooks | -| `--explain-drift` managed | Scheduled drift monitoring with alerts and dashboard. | Scheduled jobs, alert delivery | -| `--document` hosted | Continuously updated schema documentation portal. | Hosting, persistence | -| VS Code extension (premium) | Shared diff history, approval workflows in IDE, team account features. (Base extension is free and open source.) | Team account infrastructure | -| Compliance reporting | NIST / EU AI Act mapping of schema changes to control frameworks. | Report generation, export | +**Use case:** "What changed in production? Is it safe?" ---- +**Tests:** 80+ new tests (target: 270+ total) -## 6. Enterprise Gating Architecture +**Release:** v1.6.0 -Three layers: +**Why first:** +- Highest differentiation (competitors don't have this) +- Reuses existing schema inspection logic +- Fills gap: explain migrations vs. reality -### Layer 1 — License Key - -Offline-verifiable, HMAC-signed license key. No license server call -required — works in air-gapped environments. +--- -``` -MIGRADIFF-ENT-{base64_encoded_payload}-{hmac_signature} -``` +### Session 020: Multi-Language README (3–5 days) + +**Feature:** README in multiple languages (i18n). + +Supported languages: +- 🇬🇧 English (default) +- 🇫🇷 French (README.fr.md) +- 🇩🇪 German (README.de.md) +- 🇯🇵 Japanese (README.ja.md) +- 🇨🇳 Chinese (README.zh.md) +- 🇮🇳 Hindi (README.hi.md) +- 🇮🇱 Hebrew (README.he.md) + +**How:** +- Maintain main README.md (English) +- Create translated versions in repo root +- Link from main README +- Use GitHub language detection for auto-redirect + +**Why:** +- Global audience (PostgreSQL is international) +- **Strategic focus:** India has second-largest PostgreSQL user base globally (after US) +- Drives adoption in high-growth markets (India, China, Japan) +- Differentiator (most tools English-only) +- SEO boost (ranked in multiple language searches) +- Hindi captures ~600M+ speakers in India tech ecosystem + +**Market sizing:** +- US: ~40% of users (English) +- India: ~20% of users (Hindi + English) +- Europe: ~15% of users (French, German) +- Asia-Pacific: ~15% of users (Chinese, Japanese) +- Israel/other: ~10% of users (Hebrew, English) + +**Release:** v1.6.1 -Payload: -```json -{ - "customer": "acme-corp", - "tier": "enterprise", - "features": ["shadow_run", "saml", "audit", "rbac"], - "issued_at": "2026-05-30", - "expires_at": "2027-05-30", - "seats": 25 -} -``` +--- -HMAC signed with Lateos private key. Verification uses public key -bundled with the tool. +### Planned Sessions (Backlog) -### Layer 2 — Feature Flags +| Session | Feature | Effort | Value | Notes | +|---------|---------|--------|-------|-------| +| 021 | `--document` | Medium-High | High | Schema documentation generation | +| 022 | pgvector support | Low | Medium | Modern Postgres vector types | +| 023 | `--suggest-indexes` | Medium | Medium | AI recommends useful indexes | +| 024 | `--dry-run --explain` | Low | Medium | Preview changes without applying | +| 025 | Multi-schema refactor | Medium | High | Better support for multiple schemas | -```python -from migra.license import require_feature +--- -@require_feature("shadow_run") -def run_shadow_simulation(config): - ... -``` +## Enterprise Tier (Post v1.6.0) -Clean error on missing feature: -``` -MigraDiff Enterprise: shadow_run requires an Enterprise license. -Contact enterprise@lateos.ai or visit https://migradiff.com/enterprise -``` +**Gating:** HMAC-signed license key (`MIGRADIFF-ENT-{base64}-{hmac}`) -### Layer 3 — Telemetry (Enterprise Only) +### Features (Roadmap) -License validation calls home only for enterprise features (seat -counting, usage metering). Free tier has zero telemetry. +| Feature | Phase | Timeline | Notes | +|---------|-------|----------|-------| +| Hosted AI key | Phase 1 | Month 2–3 | Users don't manage Anthropic API key | +| Shadow Run | Phase 1 | Month 3–4 | Firecracker microVMs for safe testing | +| Team RBAC | Phase 2 | Month 4–5 | Multiple users, role-based access | +| Audit trail dashboard | Phase 2 | Month 5–6 | Compliance, change history, who-did-what | +| PR comment injection | Phase 2 | Month 6–7 | GitHub App auto-comments on PRs | +| Compliance reporting | Phase 3 | Month 7–8 | SOC 2, audit logs, retention policies | --- -## 7. Business Model - -### Pricing Tiers (Planned) +## Free vs Enterprise Split + +### **Free Tier (Local, User-Controlled)** +- `--explain` (explain migrations) +- `--rollback` (generate reversals) +- `--advise` (risk assessment) +- `--generate` (write from plain English) +- `--explain-drift` (compare live databases) +- `--document` (schema documentation) +- `--comment-on` (diff annotations) +- pgvector support +- Docker/GitHub Actions/pre-commit integration +- Multi-language README + +**Monetization:** Community adoption, word-of-mouth, visibility to Supabase/Redgate + +### **Enterprise Tier (Hosted/Managed)** +- Hosted Anthropic API key management +- Shadow Run (safe migration testing in isolated VMs) +- Team RBAC (multiple users, permissions) +- Audit trail dashboard (compliance, history) +- PR comment injection (GitHub App integration) +- Compliance reporting (SOC 2, audit logs) + +**Pricing model:** +- Free: forever +- Team: $299/month (5 users, audit logs, team management) +- Enterprise: custom pricing (large scale, compliance, SLA) -| Tier | Price | Target | -|---|---|---| -| Free (open source) | $0 | Individual developers, open-source projects | -| Core support | ~$5K/year | Teams needing SLA and priority bug fixes | -| Managed service | ~$20K/year | Teams needing Shadow Run, hosted drift monitoring, RBAC | -| Enterprise | Custom | Large orgs needing SAML/SSO, audit compliance, on-prem | - -### Revenue Model - -- Free tier builds community, adoption, and acquisition signal -- Core support converts power users who need SLA guarantees -- Managed service converts teams who need hosted infrastructure -- Enterprise converts regulated industries (healthcare, fintech, gov) - -### Unit Economics Target +--- -- 150 Core customers × $5K = $750K -- 50 Managed customers × $20K = $1M -- Premium + consulting = upside -- **Y1 ARR target: $1–2M** +## Key Architecture Decisions + +### Build System +- Poetry (dependency management) +- Python 3.10+ (floor version) +- setuptools (explicit dependency for schemainspect compatibility) + +### AI Features +- Claude Haiku (cost-effective, fast) +- User's own Anthropic API key (free tier) +- Temperature 0 (deterministic outputs) +- Lazy imports (only load when used) + +### Data Provenance +- All AI training data pipelines use cryptographic audit traceability +- Content hash (SHA-256), source_url, harvest_timestamp +- HMAC-SHA-256 signed pipeline_manifest.json +- License quarantine file (no split leakage) + +### CI/CD +- GitHub Actions (lint, test matrix, coverage) +- Branch protection on `master` (CI required) +- Automated PyPI release on version tags +- Feature branch workflow (always test before merge) + +### Database Support +- PostgreSQL 12+ (tested 14, 15, 16, 17) +- schemainspect for schema introspection +- sqlbag for connection management +- No ORM dependency (raw SQL + AST parsing) --- -## 8. Go-to-Market Strategy +## Known Limitations -### Phase 1 — Community Adoption (Current) +### schemainspect + setuptools dependency +The `schemainspect` package (upstream: djrobstep, unmaintained) uses deprecated `pkg_resources` which requires `setuptools` at runtime. Added as explicit dependency in pyproject.toml. -- PyPI distribution (`pip install migradiff`) -- Docker image for zero-install usage -- GitHub Action for CI integration -- Pre-commit hook for local development -- README positions MigraDiff as the drop-in `migra` continuation -- Social: Reddit r/PostgreSQL, Hacker News (Show HN), X, LinkedIn -- `enterprise@lateos.ai` in README for inbound enterprise interest +**Migration path (future):** Replace with maintained schema inspection library or migrate to Rust. -### Phase 2 — Design Partner (Next) +--- -- Identify 1–3 enterprise design partners from inbound interest -- Build enterprise features against real requirements, not guesses -- Do not build enterprise infrastructure speculatively +## Version History -### Phase 3 — Managed Service Launch +| Version | Release Date | Key Features | +|---------|--------------|--------------| +| v1.3.0 | May 2026 | --explain, --from-migrations-dir | +| v1.4.0 | June 1, 2026 | --rollback, --advise, --generate | +| v1.5.0 | June 4, 2026 | COMMENT ON diffing | +| v1.5.1 | June 4, 2026 | Version bump (no feature changes) | +| v1.6.0 | TBD (Session 019) | --explain-drift | +| v1.6.1 | TBD (Session 020) | Multi-language README | -- Shadow Run as flagship enterprise feature -- Landing page with pricing tiers -- Stripe billing integration -- Free trial → paid conversion funnel +--- -### Target Buyers +## Marketing & Positioning -- Platform engineering teams managing PostgreSQL schema changes -- DBAs in regulated industries (healthcare, fintech) -- Supabase users (natural ecosystem fit) -- Teams migrating from deprecated `djrobstep/migra` +### Free Tier Positioning +"The AI-powered PostgreSQL migration tool that explains, reverses, and predicts risk in real-time." -### Sales Advantage +### Enterprise Positioning +"Safe, auditable database migrations for teams. Compliance-ready. Built for scale." -Leo's healthcare field service engineering background gives direct -credibility in clinical/hospital environments where PostgreSQL powers -EHR integrations and compliance is mandatory. +### Competitive Advantages +1. **AI-native:** Every migration gets explained and risk-assessed +2. **Safe-by-default:** Detects dangerous patterns before deployment +3. **Multi-language:** Explains diffs, docs, and README in 6+ languages +4. **Live database aware:** `--explain-drift` compares reality, not just migrations +5. **Open source:** Free tier drives adoption, enterprise tier funds development --- -## 9. Exit Strategy +## Acquisition Narrative -### Target Acquirers +**For Redgate (Flyway competitor):** +- Redgate owns Flyway (migration tool) +- MigraDiff fills the "schema analysis" gap +- Combined: Flyway migrations + MigraDiff intelligence = best-in-class -| Acquirer | Rationale | Estimated Multiple | -|---|---|---| -| Supabase | Postgres-native, "backend for everyone" platform, already owns database tooling | 10–12x ARR | -| Redgate | DevOps platform expansion, already acquires database diff/migration tools | 8–10x ARR | -| AWS | RDS tooling ecosystem, could bundle with Aurora/RDS | Strategic premium | +**For Supabase (PostgreSQL platform):** +- Supabase sells managed PostgreSQL +- MigraDiff drives migration adoption +- Combined: Supabase + MigraDiff = seamless developer experience -### Timeline +**Valuation basis:** +- v1.6.0: $3–4M ARR → $15–25M exit (3–5x revenue multiple) +- Enterprise adoption (Year 2): $5–8M ARR → $25–40M exit (5–7x multiple) -- **Year 1:** Ship free AI suite, build community, land first enterprise - design partners, reach $1–2M ARR -- **Year 2:** Scale managed service, stack with pgAudit/WAL-G/pgBackRest - forks for combined $3–4M ARR -- **Year 2–3:** Exit at $15–25M to Supabase or Redgate +--- -### Portfolio Context +## Success Metrics (OKRs) -MigraDiff is the lead project in a stack of deprecated PostgreSQL tool -forks, all following the same playbook (fork → fix → modernize → add -enterprise features → acquisition target): +### Q2 2026 +- ✅ v1.5.0 shipped +- ✅ CI/CD pipeline live +- ⏳ v1.6.0 shipped (`--explain-drift`) +- ⏳ 50+ GitHub stars +- ⏳ 1k+ monthly PyPI downloads -1. **MigraDiff** (migra fork) — schema diff — active, v1.4.0 -2. **pgAudit wrapper** — compliance audit logging — planned -3. **WAL-G fork** — cloud-native backup workflows (Go) — planned -4. **pgBackRest fork** — backup/restore (C, v2.58.0 final) — planned +### Q3 2026 +- ⏳ v1.6.1 shipped (multi-language README) +- ⏳ v1.7.0 shipped (`--document`, pgvector support) +- ⏳ 10+ enterprise customers ($30k–$100k MRR) +- ⏳ 100+ GitHub stars +- ⏳ 5k+ monthly PyPI downloads -Combined portfolio targets $3–4M ARR and $15–25M exit. +### Q4 2026 +- ⏳ Enterprise tier revenue: $50k/month ARR +- ⏳ Acquisition conversations with Redgate/Supabase +- ⏳ Featured on r/PostgreSQL, HackerNews +- ⏳ 10k+ monthly PyPI downloads --- -## 10. Development Practices - -- **Tests-first:** Confirm runtime failure before writing implementation -- **No vibe-coding:** Every prompt has explicit stop conditions -- **CLAUDE.md as convention anchor:** All coding agents read it first -- **Sequential execution:** OpenCode Zen with `--delay=5` for rate limiting -- **Tool separation:** Claude (Anthropic) for architecture, strategy, - prompt engineering, and dataset quality review; implementation - delegated to coding agents (Minimax M2.5, GLM-5.1/DeepSeek V4 Flash) -- **Linting:** flake8 (0 warnings) and black (clean) enforced on every - session exit -- **Branching:** `feat/session-NNN-feature-name`, local commit only - during session, push on release -- **Commit format:** Defined in CLAUDE.md +## Team & Workload ---- +**Team:** Leo (solo, Lateos founder) -## 11. Risk Management +**Time allocation:** +- MigraDiff: 50% (revenue priority) +- npm-scan: 20% (security research) +- Other Lateos projects: 30% (pgAudit, ESLint, WAL-G forks) -| Risk | Mitigation | -|---|---| -| Anthropic API changes | AI features are optional; core diff is dependency-free. Lazy import pattern isolates breakage. | -| Upstream revival | Unlikely (deprecated 2024, archived). Fork is already ahead on features. | -| Competitor (e.g. pgAdmin adds diff) | AI suite is differentiator; no PostgreSQL tool has schema-aware AI migration generation. | -| Low enterprise conversion | Free tier builds acquisition signal regardless; acquirer buys community + technology, not just revenue. | -| Shadow Run operational complexity | Don't build until design partner requests it. Firecracker microVM lifecycle is well-documented. | -| Key-person risk | MIT license, clean codebase, comprehensive tests — acquirable even without founder. | +**Engineering discipline:** +- Tests first, stop conditions on every prompt +- Three-phase workflow: reproduce → fix → document +- CI/CD validates every change before merge to master +- CLAUDE.md convention anchor for consistency +- Production-grade pipeline: feature branch → PR → CI → merge → release --- -## 12. Key Contacts +## Next Steps -| Role | Contact | -|---|---| -| Maintainer | Leo — leo@lateos.ai | -| Enterprise inquiries | enterprise@lateos.ai | -| LinkedIn | linkedin.com/in/roongrunchai-chong-c-ab9742108 | -| GitHub | github.com/migradiff/migra | +1. **Session 019:** Implement `--explain-drift` (7–10 days) + - New feature: `migra --from-db X --to-db Y --explain-drift` + - 80+ tests (target 270+ total) + - Release v1.6.0 ---- +2. **Session 020:** Multi-language README (3–5 days) + - README in 6 languages + - i18n links from main README + - Release v1.6.1 + +3. **Post v1.6.0:** Enterprise tier planning + - Design licensing system + - Plan hosted features + - Build enterprise marketing narrative -## Document History +--- -| Version | Date | Changes | -|---|---|---| -| 1.0 | June 1, 2026 | Initial formal plan — compiled from sessions 001–013, roadmap discussions, and business strategy. | +**Document version:** Updated June 4, 2026 (post-Session 018) +**Last updated by:** Claude (with Leo) +**Repository:** https://github.com/postgresql-tools/migra diff --git a/PROJECT_PLAN2.md b/PROJECT_PLAN2.md index 4f264fa..c08da2a 100644 --- a/PROJECT_PLAN2.md +++ b/PROJECT_PLAN2.md @@ -6,7 +6,7 @@ - **Package:** `migradiff` (PyPI) - **CLI:** `migra` (backward compatible) -- **Repo:** https://github.com/migradiff/migra +- **Repo:** https://github.com/postgresql-tools/migra - **Maintainer:** Leo (Lateos) - **License:** MIT @@ -325,4 +325,4 @@ The `schemainspect` package (upstream: djrobstep, unmaintained) uses deprecated **Document version:** Updated June 4, 2026 (post-Session 018) **Last updated by:** Claude (with Leo) -**Repository:** https://github.com/migradiff/migra +**Repository:** https://github.com/postgresql-tools/migra diff --git a/README.de.md b/README.de.md index 037a813..325d713 100644 --- a/README.de.md +++ b/README.de.md @@ -50,7 +50,7 @@ Erfordert Python 3.10+ und eine laufende PostgreSQL-Instanz (12+). Zur Installation aus dem Quellcode: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v Keine Python-Umgebung? Verwenden Sie das offizielle Image: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ Fügen Sie Schema-Diffing zu Ihrem Pull-Request-Workflow hinzu: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ Fügen Sie Schema-Diffing zu Ihrem Pull-Request-Workflow hinzu: Lassen Sie den Build automatisch fehlschlagen, wenn destruktive Operationen erkannt werden: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ Lassen Sie den Build automatisch fehlschlagen, wenn destruktive Operationen erka Verwenden Sie Schema-Dump-Dateien anstelle von Live-Verbindungen: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ Vollständige Konfigurationsoptionen finden Sie unter [docs/action-usage.md](doc ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ Vollständige Konfigurationsoptionen finden Sie in der Datei `pre-commit-config. | --schema-Flag | Grenzfälle in Multi-Schema-DBs | Kommagetrennt, schemaübergreifende Abhängigkeiten gelöst | | pg_dump-Eingabe | Nicht unterstützt | Erstklassiger `--from-file`-Modus | | JSON-Ausgabe | Nicht unterstützt | `--output json` mit Risikoklassifizierung | -| Docker-Image | Keines | `ghcr.io/migradiff/migra` | -| GitHub Action | Keine | `migradiff/migra-action` | +| Docker-Image | Keines | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | Keine | `postgresql-tools/migra-action` | | Pre-commit-Hook | Keiner | `.pre-commit-hooks.yaml` | | Entwicklungsumgebung | Manuelle Docker-Befehle | `docker compose up -d` | | KI-Erklärung | Keine | `--explain`-Flag mit Claude — einfache Diff-Erklärung, Risikoanalyse, sicherere Alternativen | @@ -335,17 +335,11 @@ migra benötigt eine Live-PostgreSQL-Verbindung zur Schema-Introspection oder Sc --- -## Mitwirken +## Mitwirkungshinweis -Fehlerberichte und PRs sind willkommen. Wenn Sie etwas beheben, das im Upstream `djrobstep/migra` gemeldet wurde, verweisen Sie in Ihrem PR auf diese Issue-Nummer — das hilft uns zu verfolgen, was die Community am dringendsten behoben haben möchte. +Vielen Dank für Ihr Interesse an diesem Projekt. Bitte beachten Sie, dass wir derzeit keine externen Codebeiträge, Pull Requests, Fehlerbehebungen oder Funktionsvorschläge annehmen. -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +Alle geoffneten Pull Requests werden ohne Uberprufung automatisch geschlossen. --- diff --git a/README.fr.md b/README.fr.md index d3faeb5..a39f1e6 100644 --- a/README.fr.md +++ b/README.fr.md @@ -50,7 +50,7 @@ Nécessite Python 3.10+ et une instance PostgreSQL en cours d'exécution (12+). Pour installer depuis les sources : ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v Pas d'environnement Python ? Utilisez l'image officielle : ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ Ajoutez la comparaison de schéma à votre workflow de pull request : ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ Ajoutez la comparaison de schéma à votre workflow de pull request : Échouez automatiquement la build si des opérations destructrices sont détectées : ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ Ajoutez la comparaison de schéma à votre workflow de pull request : Utilisez des fichiers de dump de schéma au lieu de connexions en direct : ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ Voir [docs/action-usage.md](docs/action-usage.md) pour les options de configurat ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ Voir `pre-commit-config.example.yaml` à la racine du dépôt pour les options d | Drapeau --schema | Cas limites dans les bases multi-schémas | Séparés par des virgules, dépendances inter-schémas résolues | | Entrée pg_dump | Non supporté | Mode `--from-file` de première classe | | Sortie JSON | Non supporté | `--output json` avec classification des risques | -| Image Docker | Aucune | `ghcr.io/migradiff/migra` | -| GitHub Action | Aucune | `migradiff/migra-action` | +| Image Docker | Aucune | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | Aucune | `postgresql-tools/migra-action` | | Hook Pre-commit | Aucun | `.pre-commit-hooks.yaml` | | Environnement de développement | Commandes Docker manuelles | `docker compose up -d` | | Explication IA | Aucune | Drapeau `--explain` avec Claude — explication de différence en langage clair, analyse des risques, alternatives plus sûres | @@ -335,17 +335,11 @@ migra nécessite une connexion PostgreSQL en direct pour introspecter les schém --- -## Contribution +## Avis de Contribution -Les signalements de bugs et les PR sont les bienvenus. Si vous corrigez quelque chose qui a été signalé dans `djrobstep/migra`, référencez ce numéro de problème dans votre PR — cela nous aide à suivre ce que la communauté a le plus besoin de voir corrigé. +Merci de votre intérêt pour ce projet. Veuillez noter que nous n'acceptons actuellement aucune contribution de code externe, pull request, correction de bug ou soumission de fonctionnalité. -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +Toute pull request ouverte sera automatiquement fermée sans examen. --- diff --git a/README.he.md b/README.he.md index 81ccdbc..2f9902c 100644 --- a/README.he.md +++ b/README.he.md @@ -50,7 +50,7 @@ pip install migradiff להתקנה מקוד המקור: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v אין סביבת Python? השתמשו בתמונה הרשמית: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ הוסיפו השוואת סכמות לוורק פלו של בקשת המשיכה (pull request) שלכם: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ docker run --rm ghcr.io/migradiff/migra \ גרמו לבנייה להיכשל באופן אוטומטי אם מתגלות פעולות הרסניות: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ docker run --rm ghcr.io/migradiff/migra \ השתמשו בקבצי דמפ סכמה במקום חיבורים חיים: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ docker run --rm ghcr.io/migradiff/migra \ ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ repos: | דגל --schema | מקרי קצה במסדי נתונים מרובי סכמות | מופרד בפסיקים, תלויות חוצות סכמה נפתרו | | קלט pg_dump | לא נתמך | מצב `--from-file` מדרגה ראשונה | | פלט JSON | לא נתמך | `--output json` עם סיווג סיכונים | -| תמונת Docker | אין | `ghcr.io/migradiff/migra` | -| GitHub Action | אין | `migradiff/migra-action` | +| תמונת Docker | אין | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | אין | `postgresql-tools/migra-action` | | הוק Pre-commit | אין | `.pre-commit-hooks.yaml` | | סביבת פיתוח | פקודות Docker ידניות | `docker compose up -d` | | הסבר AI | אין | דגל `--explain` עם Claude — הסבר הבדלים בשפה פשוטה, ניתוח סיכונים, חלופות בטוחות יותר | @@ -335,17 +335,11 @@ migra דורש חיבור PostgreSQL חי כדי לבחון סכמות, או ק --- -## תרומה +## הודעת תרומה -דיווחי באגים ו-PRs מתקבלים בברכה. אם אתם מתקנים משהו שדווח ב-`djrobstep/migra`, ציינו את מספר הבעיה ב-PR שלכם — זה עוזר לנו לעקוב אחר מה שהקהילה הכי זקוקה לתיקונו. +תודה על התעניינותכם בפרויקט זה. שימו לב כי איננו מקבלים כרגע תרומות קוד חיצוניות, בקשת משיכה (pull requests), תיקוני באגים או הצעות תכונה. -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +כל בקשת משיכה שתיפתח תיסגר אוטומטית ללא סקירה. --- diff --git a/README.hi.md b/README.hi.md index 3f85e88..d3fcf08 100644 --- a/README.hi.md +++ b/README.hi.md @@ -50,7 +50,7 @@ pip install migradiff स्रोत से इंस्टॉल करने के लिए: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v कोई Python वातावरण नहीं? आधिकारिक इमेज का उपयोग करें: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ अपने पुल रिक्वेस्ट वर्कफ़्लो में स्कीमा डिफिंग जोड़ें: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ docker run --rm ghcr.io/migradiff/migra \ यदि विनाशकारी संचालन का पता चलता है तो बिल्ड को स्वचालित रूप से विफल करें: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ docker run --rm ghcr.io/migradiff/migra \ लाइव कनेक्शन के बजाय स्कीमा डंप फ़ाइलों का उपयोग करें: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ docker run --rm ghcr.io/migradiff/migra \ ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ repos: | --schema फ्लैग | मल्टी-स्कीमा DB में एज केस | अल्पविराम-पृथक, क्रॉस-स्कीमा निर्भरताएं हल | | pg_dump इनपुट | समर्थित नहीं | प्रथम श्रेणी `--from-file` मोड | | JSON आउटपुट | समर्थित नहीं | `--output json` जोखिम वर्गीकरण के साथ | -| Docker इमेज | कोई नहीं | `ghcr.io/migradiff/migra` | -| GitHub Action | कोई नहीं | `migradiff/migra-action` | +| Docker इमेज | कोई नहीं | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | कोई नहीं | `postgresql-tools/migra-action` | | Pre-commit हुक | कोई नहीं | `.pre-commit-hooks.yaml` | | डेव वातावरण | मैनुअल Docker कमांड | `docker compose up -d` | | AI स्पष्टीकरण | कोई नहीं | Claude के साथ `--explain` फ्लैग — सादी अंग्रेजी डिफ स्पष्टीकरण, जोखिम विश्लेषण, सुरक्षित विकल्प | @@ -335,17 +335,11 @@ migra को स्कीमा इंट्रोस्पेक्ट कर --- -## योगदान +## योगदान सूचना -बग रिपोर्ट और PR का स्वागत है। यदि आप `djrobstep/migra` में रिपोर्ट की गई किसी चीज़ को ठीक कर रहे हैं, तो अपने PR में उस इश्यू नंबर का संदर्भ दें — इससे हमें ट्रैक करने में मदद मिलती है कि समुदाय को सबसे अधिक क्या ठीक करने की आवश्यकता है। +इस परियोजना में आपकी रुचि के लिए धन्यवाद। कृपया ध्यान दें कि हम वर्तमान में किसी भी बाहरी कोड योगदान, पुल रिक्वेस्ट, बग फिक्स, या फीचर सबमिशन को स्वीकार नहीं कर रहे हैं। -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +खोले गए किसी भी पुल रिक्वेस्ट को बिना समीक्षा के स्वचालित रूप से बंद कर दिया जाएगा। --- diff --git a/README.ja.md b/README.ja.md index 8b0d0ff..61f54ad 100644 --- a/README.ja.md +++ b/README.ja.md @@ -50,7 +50,7 @@ Python 3.10+ と動作中の PostgreSQL インスタンス(12+)が必要で ソースからインストールする場合: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v Python 環境がありませんか?公式イメージを使用してください: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ プルリクエストワークフローにスキーマ差分を追加: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ docker run --rm ghcr.io/migradiff/migra \ 破壊的操作が検出された場合に自動的にビルドを失敗させる: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ docker run --rm ghcr.io/migradiff/migra \ ライブ接続の代わりにスキーマダンプファイルを使用: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ docker run --rm ghcr.io/migradiff/migra \ ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ repos: | --schema フラグ | マルチスキーマDBでエッジケース | カンマ区切り、クロススキーマ依存性解決済み | | pg_dump 入力 | 未サポート | 第一級の `--from-file` モード | | JSON 出力 | 未サポート | `--output json` リスク分類付き | -| Docker イメージ | なし | `ghcr.io/migradiff/migra` | -| GitHub Action | なし | `migradiff/migra-action` | +| Docker イメージ | なし | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | なし | `postgresql-tools/migra-action` | | Pre-commit フック | なし | `.pre-commit-hooks.yaml` | | 開発環境 | 手動 Docker コマンド | `docker compose up -d` | | AI 説明 | なし | Claude を使用した `--explain` フラグ — 平易な言葉での差分説明、リスク分析、安全な代替案 | @@ -335,17 +335,11 @@ migra はスキーマを調査するためにライブの PostgreSQL 接続、 --- -## コントリビューション +## コントリビューションに関するお知らせ -バグ報告と PR を歓迎します。`djrobstep/migra` で報告された問題を修正する場合は、PR にそのイシュー番号を記載してください — コミュニティが最も修正を必要としているものを追跡するのに役立ちます。 +このプロジェクトにご関心をお寄せいただきありがとうございます。現在、外部からのコード貢献、プルリクエスト、バグ修正、機能提案は受け付けておりません。 -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +開かれたプルリクエストはレビューなしで自動的にクローズされます。 --- diff --git a/README.md b/README.md index 20c4826..03faa5d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Requires Python 3.10+ and a running PostgreSQL instance (12+). To install from source: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -301,7 +301,7 @@ docker compose down -v No Python environment? Use the official image: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -312,7 +312,7 @@ docker run --rm ghcr.io/migradiff/migra \ Add schema diffing to your pull request workflow: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -321,7 +321,7 @@ Add schema diffing to your pull request workflow: Fail the build automatically if destructive operations are detected: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -331,7 +331,7 @@ Fail the build automatically if destructive operations are detected: Use schema dump files instead of live connections: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -346,7 +346,7 @@ See [docs/action-usage.md](docs/action-usage.md) for full configuration options. ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -382,8 +382,8 @@ configuration options. | --schema flag | Edge cases in multi-schema DBs | Comma-separated, cross-schema dependencies resolved | | pg_dump input | Not supported | First-class `--from-file` mode | | JSON output | Not supported | `--output json` with risk classification | -| Docker image | None | `ghcr.io/migradiff/migra` | -| GitHub Action | None | `migradiff/migra-action` | +| Docker image | None | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | None | `postgresql-tools/migra-action` | | Pre-commit hook | None | `.pre-commit-hooks.yaml` | | Dev environment | Manual Docker commands | `docker compose up -d` | | AI explanation | None | `--explain` flag with Claude — plain English diff explanation, risk analysis, safer alternatives | @@ -406,19 +406,13 @@ or schema dump files via `--from-file`. It does not parse raw DDL text. --- -## Contributing +## Contributing Notice -Bug reports and PRs are welcome. If you're fixing something that was -reported upstream in `djrobstep/migra`, reference that issue number -in your PR — it helps us track what the community most needs fixed. +Thank you for your interest in this project. Please note that we are +currently not accepting any external code contributions, pull requests, +bug fixes, or feature submissions at this time. -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +Any pull requests opened will be automatically closed without review. --- diff --git a/README.zh.md b/README.zh.md index 0a3bd5c..ade8c5b 100644 --- a/README.zh.md +++ b/README.zh.md @@ -50,7 +50,7 @@ pip install migradiff 从源码安装: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ``` @@ -236,7 +236,7 @@ docker compose down -v 没有 Python 环境?使用官方镜像: ```bash -docker run --rm ghcr.io/migradiff/migra \ +docker run --rm ghcr.io/postgresql-tools/migra \ postgres://db_a postgres://db_b ``` @@ -247,7 +247,7 @@ docker run --rm ghcr.io/migradiff/migra \ 将模式差异对比添加到您的拉取请求工作流中: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -256,7 +256,7 @@ docker run --rm ghcr.io/migradiff/migra \ 检测到破坏性操作时自动使构建失败: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -266,7 +266,7 @@ docker run --rm ghcr.io/migradiff/migra \ 使用模式转储文件而不是实时连接: ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -281,7 +281,7 @@ docker run --rm ghcr.io/migradiff/migra \ ```yaml # .pre-commit-config.yaml repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra @@ -316,8 +316,8 @@ repos: | --schema 标志 | 多模式数据库中存在边缘情况 | 逗号分隔,跨模式依赖已解决 | | pg_dump 输入 | 不支持 | 一流的 `--from-file` 模式 | | JSON 输出 | 不支持 | `--output json` 带风险分类 | -| Docker 镜像 | 无 | `ghcr.io/migradiff/migra` | -| GitHub Action | 无 | `migradiff/migra-action` | +| Docker 镜像 | 无 | `ghcr.io/postgresql-tools/migra` | +| GitHub Action | 无 | `postgresql-tools/migra-action` | | Pre-commit 钩子 | 无 | `.pre-commit-hooks.yaml` | | 开发环境 | 手动 Docker 命令 | `docker compose up -d` | | AI 解释 | 无 | `--explain` 标志配合 Claude —— 通俗语言差异解释、风险分析、更安全的替代方案 | @@ -335,17 +335,11 @@ migra 需要实时 PostgreSQL 连接来内省模式,或通过 `--from-file` --- -## 贡献 +## 贡献须知 -欢迎提交错误报告和 PR。如果您在修复 `djrobstep/migra` 中上游报告的问题,请在您的 PR 中引用该问题编号 —— 这有助于我们追踪社区最需要修复的内容。 +感谢您对这个项目的关注。请注意,我们目前不接受任何外部代码贡献、拉取请求、错误修复或功能提交。 -```bash -git clone https://github.com/migradiff/migra -cd migra -docker compose up -d -pip install -e ".[dev]" -pytest -``` +任何打开的拉取请求将自动关闭,恕不审查。 --- diff --git a/action.yml b/action.yml index 2adfc3d..2856998 100644 --- a/action.yml +++ b/action.yml @@ -43,7 +43,7 @@ outputs: runs: using: docker - image: docker://ghcr.io/migradiff/migra:1.4.0 + image: docker://ghcr.io/postgresql-tools/migra:1.4.0 env: MIGRA_BASE_URL: ${{ inputs.base_url }} MIGRA_HEAD_URL: ${{ inputs.head_url }} diff --git a/docker-build.sh b/docker-build.sh index c4b1601..0807e65 100644 --- a/docker-build.sh +++ b/docker-build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -IMAGE_NAME="ghcr.io/migradiff/migra" +IMAGE_NAME="ghcr.io/postgresql-tools/migra" TAG="${1:-latest}" docker build -t "${IMAGE_NAME}:${TAG}" . diff --git a/docs/action-usage.md b/docs/action-usage.md index d4eb4fd..29b2cb1 100644 --- a/docs/action-usage.md +++ b/docs/action-usage.md @@ -3,7 +3,7 @@ ## Basic Usage (Connection Strings) ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -12,7 +12,7 @@ ## Schema Dump Files (No Live Connection Required) ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_file: schema_production.sql head_file: schema_branch.sql @@ -21,7 +21,7 @@ ## Fail on Destructive Operations ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} head_url: ${{ secrets.DB_BRANCH_URL }} @@ -31,7 +31,7 @@ ## Migrations Directory ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 with: base_url: ${{ secrets.DB_PRODUCTION_URL }} migrations_dir: ./supabase/migrations @@ -40,7 +40,7 @@ ## JSON Output ```yaml -- uses: migradiff/migra@v1 +- uses: postgresql-tools/migra@v1 id: schema_diff with: base_url: ${{ secrets.DB_PRODUCTION_URL }} diff --git a/pre-commit-config.example.yaml b/pre-commit-config.example.yaml index b7ef353..e7635f2 100644 --- a/pre-commit-config.example.yaml +++ b/pre-commit-config.example.yaml @@ -2,7 +2,7 @@ # Copy this to your project and adjust the rev to the latest release tag. repos: - - repo: https://github.com/migradiff/migra + - repo: https://github.com/postgresql-tools/migra rev: v1.1.0 hooks: - id: migra diff --git a/pyproject.toml b/pyproject.toml index 0bbb89a..a88b278 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,28 @@ +[project] +name = "migradiff" +version = "1.7.2" +description = "Like `diff` but for PostgreSQL schemas — actively maintained fork" +homepage = "https://github.com/postgresql-tools/migra" + +[project.urls] +Repository = "https://github.com/postgresql-tools/migra" +"Bug Tracker" = "https://github.com/postgresql-tools/migra/issues" + [tool.poetry] name = "migradiff" -version = "1.5.2" +version = "1.7.2" authors = [ "MigraDiff Team ",] license = "MIT" readme = "README.md" description = "Like `diff` but for PostgreSQL schemas — actively maintained fork" -repository = "https://github.com/migradiff/migra" -homepage = "https://github.com/migradiff/migra" +repository = "https://github.com/postgresql-tools/migra" +homepage = "https://github.com/postgresql-tools/migra" packages = [{ include = "migra" }] +[tool.poetry.urls] +"Bug Tracker" = "https://github.com/postgresql-tools/migra/issues" + [tool.poetry.dependencies] python = ">=3.10,<4" sqlbag = "*" diff --git a/resolve-readme-conflict.ps1 b/resolve-readme-conflict.ps1 index 696f523..ba8dd44 100644 --- a/resolve-readme-conflict.ps1 +++ b/resolve-readme-conflict.ps1 @@ -40,7 +40,7 @@ Requires Python 3.10+ and a running PostgreSQL instance (12+). To install from source: ```bash -git clone https://github.com/migradiff/migra +git clone https://github.com/postgresql-tools/migra cd migra pip install -e . ```