Skip to content

docs(field-trials): FT17 (schema-diff) report — ADR-0009 implementation#418

Merged
hideyukiMORI merged 1 commit into
mainfrom
docs/417-field-trial-17-schema-diff
May 22, 2026
Merged

docs(field-trials): FT17 (schema-diff) report — ADR-0009 implementation#418
hideyukiMORI merged 1 commit into
mainfrom
docs/417-field-trial-17-schema-diff

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

ADR-0009 (#416) draft 直後の implementation trial 報告。Trial Issue #417

結果

  • `cli/schemaDiff.php` + `SchemaDiffer` (pure-static engine) + `SchemaCompiler` 4 helper を private → public
  • MySQL (`INFORMATION_SCHEMA`) / SQLite (`PRAGMA table_info`) 双方サポート
  • 5 live scenarios 全 pass: in-sync / new-column / round-trip / extra-column warning / drop-table → CREATE TABLE 復元
  • 10 unit cases (128 → 138)
  • 全 lint (test / analyze / format:check) green

F-N (5 件)

  • F-1 (info): SchemaCompiler 4 helper を private → public 化
  • F-2 (info): MySQL upper / SQLite lower case を introspection 関数内で handle
  • F-3 (ergonomics): `composer schema:diff` alias 追加要
  • F-4 (ergonomics): `--help` expand を docs PR で
  • F-5 (medium feature-gap): Add-index path 未実装 → 別 follow-up issue

Aftermath plan

  1. Feat PR: SchemaDiffer + cli/schemaDiff.php + SchemaCompiler promote + composer alias + tests
  2. Docs PR: docs/development/schema-migrations.md + AGENTS + ADR cross-link + --help expand
  3. Follow-up issue: add-index path (小、follow-up trial 不要)

Closes #417.

Test plan

  • 5 live scenarios on MySQL
  • composer test 138/138 (128 → 138)
  • composer test:http 24/24 (1 expected skip)
  • composer analyze (Phan) exit 0
  • composer format:check exit 0

ADR-0009 (#416) で Option C 採用、実装は別 trial と明記したものを FT17
で実装した報告。Trial Issue #417。

### 結果

- cli/schemaDiff.php + SchemaDiffer + SchemaCompiler 4 helper を public
  に promote
- MySQL / SQLite 双方サポート (introspection は INFORMATION_SCHEMA /
  PRAGMA)
- 5 live scenarios (sync / new-column / round-trip / extra-column warn /
  drop-table → CREATE) 全 pass
- 10 unit cases (128 → 138)
- composer test / analyze / format:check 全 green

### F-N (5 件、F-5 のみ medium)

- F-1 (informational): SchemaCompiler 4 helper を private→public 化
- F-2 (informational): MySQL INFORMATION_SCHEMA 大文字 vs SQLite PRAGMA
  小文字 を inline で handle
- F-3 (ergonomics): composer schema:diff alias 追加要
- F-4 (ergonomics): --help expand を docs PR で
- F-5 (medium feature-gap): **Add-index path 未実装** (ADR-0009 scope 内
  だが trial scope に入れず) → 小 follow-up issue で別途

### Aftermath

- Feat PR: SchemaDiffer + cli/schemaDiff.php + SchemaCompiler promotion
  + composer alias + tests (1 PR)
- Docs PR: docs/development/schema-migrations.md + ADR cross-link +
  AGENTS + --help expand
- Follow-up issue: add-index path (small)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FT17: schema-diff — ADR-0009 を実装する (cli/schemaDiff.php)

1 participant