Skip to content

Commit b501836

Browse files
dmealingclaude
andcommitted
docs(adr): ADR-0015 — make legacy migrate-code removal first-class (per-port inventory)
Retiring the per-port migrate engines is explicit deliverable work, the final step of each port's cutover. Adds a per-port removal inventory: C# Migrate/+CLI+runner; Java omdb/migrate package + driver DDL-emit methods (drivers stay for runtime) + maven MetaDataMigrateMojo (incl. existing Flyway test) + integration runner; Python migrate/ module + CLI + migration tests (2c never built); Kotlin Exposed harness; collapse the 5 migration-scenario runners into one shared suite (runtime/CRUD scenarios stay per-port); update CLAUDE.md/roadmap claims. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fb16f89 commit b501836

1 file changed

Lines changed: 35 additions & 2 deletions

File tree

spec/decisions/ADR-0015-single-shared-migrate-engine.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,41 @@ in the one engine (ADR-0013's logical/physical split, expressed as the per-port/
127127
### 6. Staged consolidation, not big-bang
128128
Keep the existing engines running. Build the consolidated engine + binary + the generate/Flyway path,
129129
migrate ports onto it one at a time behind the persistence-conformance corpus, and retire each old
130-
engine (`MetaObjects.Codegen/Migrate`, `omdb/.../migrate`, Python `migrate/`, Kotlin's Exposed
131-
delegation) only once the shared engine passes that port's scenarios.
130+
engine only once the shared engine passes that port's scenarios.
131+
132+
### 7. Removal is first-class work — per-port retirement inventory
133+
134+
Retiring the legacy migrate code is **explicit deliverable work**, not a side effect, and is the
135+
final step of each port's cutover. Inventory (as of 2026-05-30):
136+
137+
- **TypeScript**`migrate-ts` is the **consolidation target** (kept/evolved into the shared engine,
138+
likely repackaged + the `bun --compile` bin). Its `integration-tests/src/migration-scenario.ts`
139+
becomes the single shared **migrate-conformance** runner. Nothing deleted; role changes.
140+
- **C#** — delete `MetaObjects.Codegen/Migrate/*` (`SqlType`, `ExpectedSchema`, `PostgresEmit`,
141+
`PostgresIntrospect`, `SchemaDiff`, `SchemaSnapshot`, `Change`), `MetaObjects.Cli/{MigrateCommand,
142+
NpgsqlIntrospector}.cs` + `MetaObjects.Cli.Tests/MigrateCommandTests.cs`, the migrate parts of
143+
`MetaObjects.Codegen.Tests/Migrate/*`, and the per-port migration runner
144+
`MetaObjects.IntegrationTests/{MigrationScenarioTests, Runner/MigrationScenarioRunner}.cs`.
145+
- **Java** — delete the `omdb/.../db/migrate/*` package (16 files: `SqlType`, `ExpectedSchemaBuilder`,
146+
`SchemaIntrospector`, `SchemaDiffer`, `SchemaMigrationEngine`, `MigrationEmitter`, `JdbcSqlTypes`,
147+
`ViewBodyBuilder`, …) and the **migrate-only `SqlType→DDL` rendering** in the drivers
148+
(`PostgresDriver.pgType` / `DerbyDriver.derbyType`) — **carefully**, since the driver classes
149+
themselves stay for omdb *runtime* persistence (only their DDL-emit methods are migrate). Remove the
150+
`maven-plugin` `MetaDataMigrateMojo` (+ `MetaDataMigrateMojoTest`, `MetaDataMigrateMojoFlywayTest`
151+
note: prior Flyway-emit groundwork exists here and should inform the shared adapter) and the
152+
`integration-tests/.../{MigrationScenarioRunner, MigrationScenarioTests}.java`. *(The R6 Plan 1
153+
`Real4` work just landed in this code; its behavior lives on in the shared engine, which already has
154+
`real4`.)*
155+
- **Python** — delete the `migrate/*` module (`sql_type`, `expected_schema`, `expected_views`, `diff`,
156+
`postgres_emit`, `types`), the CLI `migrate` command, and `tests/integration/{test_migration_scenarios,
157+
migration_runner}.py`. (The just-considered Plan 2c Python introspection is never built.)
158+
- **Kotlin** — delete the Exposed-delegation test harness
159+
`integration-tests-kotlin/.../{ExposedMigrationEngine, MigrationScenarioConformanceTest}.kt`; Kotlin's
160+
migrate-conformance is covered by the single shared suite.
161+
- **Shared** — collapse the five per-port migration-scenario runners into **one** migrate-conformance
162+
suite against the shared engine; the per-port **runtime** (query/CRUD) scenarios stay per-port.
163+
Update status/claims (`CLAUDE.md` "all five ports ship … migrate", `spec/roadmap.md`) to "one shared
164+
migrate engine; codegen/runtime per-port."
132165

133166
## Consequences
134167

0 commit comments

Comments
 (0)