Skip to content

Commit

Permalink
Improve README.md. Fix helper tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Dec 20, 2025
1 parent af1d9e9 commit 92d6b92
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion app/plugins/Transmogrify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ These options come directly from TransmogrifyCommand::buildOptionParser.
- Dump the effective tables configuration
- bin/cake transmogrify --dump-tables-config

- Migrate a subset of tables (in safe order)
- Migrate a subset of tables (in safe order) (Experimental)
- bin/cake transmogrify --table types --table people --table person_roles

- Use a custom tables.json mapping
Expand Down Expand Up @@ -249,6 +249,28 @@ For every other character, use the full option:
bin/cake transmogrify --groups-colon-replacement '@'
```

## Preflight checklist: Checking transmogrified tables in the target (v5) database

```bash
./bin/cake transmogrify --info-schema --info-schema-role target
```
This command:
- Connects to the **target** v5 database (the `default` connection).
- Scans the database schema (e.g. `public` in PostgreSQL) and counts all real tables.
- Loads `config/schema/tables.json`, which describes the tables that are **transmogrified** from v4 to v5.
- Compares “transmogrify tables” (from `tables.json`) against the tables that exist in the v5 database and reports:
- **`Tables present (json ∧ db)`**
All tables that:
- are declared in `tables.json` (i.e. have a v4→v5 transmogrify mapping), **and**
- actually exist in the target v5 database.

These are the tables that are “wired up” for transmogrification and present in v5.
- **`Only in database`**
Tables that exist in the v5 database but are **not** declared in `tables.json`.
These are v5 tables that currently have no transmogrify mapping from v4.



## Developers

### Transmogrify SourceToTarget Command
Expand Down
2 changes: 1 addition & 1 deletion app/plugins/Transmogrify/src/Lib/Util/DbInfoPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function print(bool $asJson, bool $withPing, bool $withSchema = false, ?s

$info['schema'] = $this->service->loadSchemaInfo(
$alias,
$this->pluginRoot . DS . Transmogrify::TABLES_JSON_PATH);
$this->pluginRoot . DS . TransmogrifyEnum::TABLES_JSON_PATH);
} catch (\Throwable $e) {
$info['schema'] = [ 'error' => $e->getMessage() ];
}
Expand Down

0 comments on commit 92d6b92

Please sign in to comment.