# Changelog

## 2.0.2

### What's Changed

#### Features
* `--new` — interactive migration scaffolding with 4 modes: domain, table, inserter, free-form
* Migration ID format: `YYYYMMDD_NN_XXXXX-domain-table-description.py` with auto-detection of `__depends__`
* `prompt_scaffold()` in both `RichPresenter` (InquirerPy) and `PlainPresenter` (stdin)

#### Output Overhaul
* Replaced mixed logger + Rich output with clean unified presentation
* Migration plans rendered as `Panel` instead of `Tree`, with domain tags and short IDs (date prefix stripped)
* `[schema]`/`[inserter]` labels replaced with actual domain names via `MigrationAnalyzer.get_migration_domain()`
* Removed `INFO` prefix from informational messages
* Apply result displayed in a green `Panel`: `Applied N migration(s) · Batch #X`
* Optimizer per-file `[writer] Updated ...` logs moved to DEBUG level — clean summary shown instead

#### Fixes
* Removed `psycopg2` dependency — direct `psycopg` import only
* Fixed `ruff-format` reverting nested f-string quotes (extracted `.join()` to variables)
* Fixed `mypy` in pre-commit isolated env — added `additional_dependencies`
* Fixed pylint W1405 warnings

#### Documentation
* Comprehensive README rewrite (Why MigChain, migration structure, Mermaid graph, CLI reference)
* MIT License file added

## 2.0.1

### What's Changed

#### Architecture
* Hexagonal architecture (ports & adapters) — domain, application, infrastructure, presentation layers by @AlanLatte in #2

#### Testing
* 289 unit + integration tests with 100% code coverage
* mypy strict, pylint 10.00/10, ruff clean on both `migchain/` and `tests/`
* Pre-commit hooks: trailing-whitespace, ruff, mypy, pylint, gitleaks

#### Features
* `--optimize` — transitive reduction of dependency graph with schema verification via testcontainers
* `PlainPresenter` — logging-based output when `rich` is not installed
* `RichPresenter` — colored tables, progress bars, Mermaid syntax highlighting
* Batch tracking in `public._yoyo_migration_batches` for `--rollback-latest`
* Interactive operation picker via InquirerPy
* Mermaid dependency graph export with domain grouping and inserter/schema coloring

#### Documentation
* Comprehensive README with migration structure examples, dependency graph visualization, and CLI reference by @AlanLatte in #1, #3
* MIT License
* Example migrations across 4 domains (auth, billing, notifications, analytics)

**Full Changelog**: `c8c533c...399526b`
