ormbridge 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,19 +2,20 @@
2
2
 
3
3
  Convert ORM models between frameworks and languages, so one data model can be shared across your whole stack, from the command line or from code.
4
4
 
5
- | Format | Read | Write | Notes |
6
- | --------------------------- | :--: | :---: | ---------------------------------------------------------- |
7
- | Django models | ✔ | ✔ | `models.py` files or `models/` packages |
8
- | Prisma schema | ✔ | ✔ | All six providers; Prisma 7 header via the API |
9
- | TypeORM entities | ✔ | ✔ | Decorator-based entity classes |
10
- | Doctrine ORM entities (PHP) | ✔ | ✔ | PHP 8 attributes; writes one file per entity |
11
- | Laravel (PHP) | ✔ | ✔ | Reads migrations plus Eloquent models; writes both |
12
- | TypeScript interfaces | | ✔ | Plain interfaces and enums for front ends |
13
- | Graphene (graphene-django) | | ✔ | GraphQL types, queries and mutations that pair with Django |
5
+ | Format | Read | Write | Notes |
6
+ | --------------------------- | :--: | :---: | ----------------------------------------------------------- |
7
+ | Django models | ✔ | ✔ | `models.py` files or `models/` packages |
8
+ | Prisma schema | ✔ | ✔ | All six providers; Prisma 7 header via `--prisma-version 7` |
9
+ | TypeORM entities | ✔ | ✔ | Decorator-based entity classes |
10
+ | Doctrine ORM entities (PHP) | ✔ | ✔ | PHP 8 attributes; writes one file per entity |
11
+ | Laravel (PHP) | ✔ | ✔ | Reads migrations plus Eloquent models; writes both |
12
+ | GORM (Go) | ✔ | ✔ | Structs with `gorm` tags; writes one file per model |
13
+ | TypeScript interfaces | | ✔ | Plain interfaces and enums for front ends |
14
+ | Graphene (graphene-django) | | ✔ | GraphQL types, queries and mutations that pair with Django |
14
15
 
15
16
  See [What is converted](#what-is-converted) for the field-level mapping and [docs/CONVERSION_MATRIX.md](docs/CONVERSION_MATRIX.md) for exactly what survives a round trip between the readable formats.
16
17
 
17
- - **Static parsing, no runtime needed.** Source files are read with [tree-sitter](https://tree-sitter.github.io/), so there is no Python, Django, PHP, Composer or database to install or connect to.
18
+ - **Static parsing, no runtime needed.** Source files are read with [tree-sitter](https://tree-sitter.github.io/), so there is no Python, Django, PHP, Composer, Go toolchain or database to install or connect to.
18
19
  - **Safe for existing databases.** The default `preserve` mode keeps your existing table and column names, so a new tool can sit on top of the database you already have.
19
20
  - **Honest output.** Anything that cannot be represented produces a warning naming the model and field.
20
21
 
@@ -52,26 +53,31 @@ ormbridge convert -i ./src/Entity --from doctrine -o ./prisma/schema.prisma
52
53
 
53
54
  # Laravel project root -> Prisma (reads database/migrations and app/; vendor/, storage/, tests/ and bootstrap/cache are skipped)
54
55
  ormbridge convert -i ./my-laravel-app --from laravel -o ./prisma/schema.prisma
56
+
57
+ # GORM (Go structs with gorm tags) -> Prisma (every .go file is read; vendor/, testdata/ and *_test.go are skipped)
58
+ ormbridge convert -i ./internal/models --from gorm -o ./prisma/schema.prisma
55
59
  ```
56
60
 
57
- Formats are inferred from file extensions (`.py` = Django, `.prisma` = Prisma, `.ts` = TypeORM), or set explicitly with `--from` / `--to`. Passing a directory does not infer the format, so add `--from typeorm` (or `--from doctrine`, `--from laravel`) when reading a folder of entities; `.php` is not inferred either. Run `ormbridge formats` to list every supported format, its file extensions, and whether it can be read, written, or both. Without `-o`, the result is printed to stdout. Warnings go to stderr.
58
-
59
- | Flag | Default | Description |
60
- | ------------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
61
- | `-i, --input <paths...>` | required (or config) | Files or directories to read. Several files are merged into one schema, so abstract base classes can live in another file. |
62
- | `-o, --output <path>` | stdout | File to write. Parent directories are created. |
63
- | `-f, --from <format>` | inferred | `django`, `prisma`, `typeorm`, `doctrine` or `laravel` |
64
- | `-t, --to <format>` | inferred | `django`, `prisma`, `typeorm`, `doctrine` or `laravel` (both write a directory), `typescript` or `graphene` (output only) |
65
- | `--naming <mode>` | `preserve` | `preserve` or `normalize` (see below) |
66
- | `--provider <name>` | `postgresql` | Prisma datasource: `postgresql`, `mysql`, `sqlite`, `sqlserver`, `mongodb`, `cockroachdb`. Controls native types such as `@db.VarChar`. |
67
- | `--no-header` | off | Omit the Prisma `generator` / `datasource` blocks (useful when pasting models into an existing schema). |
68
- | `--app-label <name>` | directory name | Django app label used for default table names (`<app>_<model>`). |
69
- | `--auto-field <type>` | `int` | Key type for Django models without an explicit primary key: `int` or `bigint`. |
70
- | `--namespace <name>` | `App\Entity`, `App\Models` | PHP namespace of the Doctrine entities or Laravel models (`--to doctrine` / `--to laravel` only). Enums go in a sibling namespace. |
71
- | `--dry-run` | off | Run the whole conversion and report what would be written, without touching the filesystem. |
72
- | `--check` | off | Exit with code 3 if an output file is missing or differs from the conversion. Writes nothing. Needs an output path. |
73
- | `--config <path>` | searched | Read settings from this JSON config file instead of searching for one. |
74
- | `--no-config` | off | Ignore any config file. |
61
+ Formats are inferred from file extensions (`.py` = Django, `.prisma` = Prisma, `.ts` = TypeORM), or set explicitly with `--from` / `--to`. Passing a directory does not infer the format, so add `--from typeorm` (or `--from doctrine`, `--from laravel`, `--from gorm`) when reading a folder of entities; `.php` and `.go` are not inferred either. Run `ormbridge formats` to list every supported format, its file extensions, and whether it can be read, written, or both. Without `-o`, the result is printed to stdout. Warnings go to stderr.
62
+
63
+ | Flag | Default | Description |
64
+ | ------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
65
+ | `-i, --input <paths...>` | required (or config) | Files or directories to read. Several files are merged into one schema, so abstract base classes can live in another file. |
66
+ | `-o, --output <path>` | stdout | File to write. Parent directories are created. |
67
+ | `-f, --from <format>` | inferred | `django`, `prisma`, `typeorm`, `doctrine`, `laravel` or `gorm` |
68
+ | `-t, --to <format>` | inferred | `django`, `prisma`, `typeorm`, `doctrine`, `laravel` or `gorm` (the last three write a directory), `typescript` or `graphene` (output only) |
69
+ | `--naming <mode>` | `preserve` | `preserve` or `normalize` (see below) |
70
+ | `--provider <name>` | `postgresql` | Prisma datasource: `postgresql`, `mysql`, `sqlite`, `sqlserver`, `mongodb`, `cockroachdb`. Controls native types such as `@db.VarChar`. |
71
+ | `--no-header` | off | Omit the Prisma `generator` / `datasource` blocks (useful when pasting models into an existing schema). |
72
+ | `--app-label <name>` | directory name | Django app label used for default table names (`<app>_<model>`). |
73
+ | `--auto-field <type>` | `int` | Key type for Django models without an explicit primary key: `int` or `bigint`. |
74
+ | `--namespace <name>` | `App\Entity`, `App\Models` | PHP namespace of the Doctrine entities or Laravel models (`--to doctrine` / `--to laravel` only). Enums go in a sibling namespace. |
75
+ | `--go-package <name>` | `models` | Go package name of the GORM models, also the output sub-directory (`--to gorm` only). Must be a valid Go identifier. |
76
+ | `--prisma-version <6\|7>` | `6` | Prisma major version of the header (`--to prisma` only). `7` writes the `prisma-client` generator (with an `output`) and no datasource `url`. |
77
+ | `--dry-run` | off | Run the whole conversion and report what would be written, without touching the filesystem. |
78
+ | `--check` | off | Exit with code 3 if an output file is missing or differs from the conversion. Writes nothing. Needs an output path. |
79
+ | `--config <path>` | searched | Read settings from this JSON config file instead of searching for one. |
80
+ | `--no-config` | off | Ignore any config file. |
75
81
 
76
82
  ### Dry run and check
77
83
 
@@ -110,19 +116,21 @@ Instead of repeating flags, put them in `ormbridge.config.json` (or `.ormbridger
110
116
  }
111
117
  ```
112
118
 
113
- | Key | Type | Same as |
114
- | ------------- | --------------------- | ---------------------------------------------------------------- |
115
- | `input` | string or string list | `-i, --input` |
116
- | `output` | string | `-o, --output` |
117
- | `from` | string | `-f, --from` |
118
- | `to` | string | `-t, --to` |
119
- | `naming` | string | `--naming` (`preserve` or `normalize`) |
120
- | `provider` | string | `--provider` |
121
- | `header` | boolean | `--no-header` when `false` |
122
- | `appLabel` | string | `--app-label` |
123
- | `autoField` | string | `--auto-field` (`int` or `bigint`) |
124
- | `namespace` | string | `--namespace` (Doctrine output) |
125
- | `conversions` | list of objects | Several named conversions; each takes the keys above plus `name` |
119
+ | Key | Type | Same as |
120
+ | --------------- | --------------------- | ---------------------------------------------------------------- |
121
+ | `input` | string or string list | `-i, --input` |
122
+ | `output` | string | `-o, --output` |
123
+ | `from` | string | `-f, --from` |
124
+ | `to` | string | `-t, --to` |
125
+ | `naming` | string | `--naming` (`preserve` or `normalize`) |
126
+ | `provider` | string | `--provider` |
127
+ | `header` | boolean | `--no-header` when `false` |
128
+ | `appLabel` | string | `--app-label` |
129
+ | `autoField` | string | `--auto-field` (`int` or `bigint`) |
130
+ | `namespace` | string | `--namespace` (Doctrine or Laravel output) |
131
+ | `goPackage` | string | `--go-package` (GORM output) |
132
+ | `prismaVersion` | number | `--prisma-version` (`6` or `7`; Prisma output) |
133
+ | `conversions` | list of objects | Several named conversions; each takes the keys above plus `name` |
126
134
 
127
135
  Top-level keys are defaults for every entry in `conversions`. Flags override config values. With no `-i`, `ormbridge convert` runs every conversion in the list (and `-o` is rejected, since the conversions write to different paths); with `-i`, it runs a single conversion from the top-level settings. Unknown keys and bad values fail with a message naming the key, such as `"conversions[1].naming" must be "preserve" or "normalize" (got "weird")`.
128
136
 
@@ -144,7 +152,7 @@ To fail CI when generated files are stale:
144
152
 
145
153
  ### Multi-file output
146
154
 
147
- Most formats produce one text, written to the `-o` file. A format can instead return several files (a map of relative path to text; the Doctrine and Laravel formats do this). Then `-o` must be a directory (for example `ormbridge convert -i ./models.py --to doctrine -o ./`, or `--to laravel -o ./` to write `app/` and `database/migrations/` into a Laravel project): every file is written beneath it, creating folders as needed, and `--dry-run` and `--check` cover each file. If `-o` is an existing file or looks like a file path (it has an extension), ormbridge fails with a message listing the files and asking for a directory. See "Emitter output" under [Format registry](#format-registry) for the adapter side.
155
+ Most formats produce one text, written to the `-o` file. A format can instead return several files (a map of relative path to text; the Doctrine, Laravel and GORM formats do this). Then `-o` must be a directory (for example `ormbridge convert -i ./models.py --to doctrine -o ./`, or `--to laravel -o ./` to write `app/` and `database/migrations/` into a Laravel project): every file is written beneath it, creating folders as needed, and `--dry-run` and `--check` cover each file. If `-o` is an existing file or looks like a file path (it has an extension), ormbridge fails with a message listing the files and asking for a directory. See "Emitter output" under [Format registry](#format-registry) for the adapter side.
148
156
 
149
157
  [Back to Table of Contents](#table-of-contents)
150
158
 
@@ -152,7 +160,7 @@ Most formats produce one text, written to the `-o` file. A format can instead re
152
160
 
153
161
  **`preserve`** (default) keeps the existing database working unchanged: Django table names (`blog_post`) are kept via `@@map`, columns keep their names, and each Django many-to-many field becomes an explicit join model that matches the table Django already created.
154
162
 
155
- **`normalize`** produces a fresh-schema style: singular snake_case table names (`post`), UUID primary keys in place of auto-increment ids, camelCase Prisma fields mapped to snake_case columns, `created_at` / `updated_at` added to models that lack them, and implicit many-to-many relations.
163
+ **`normalize`** produces a fresh-schema style: singular snake_case table names (`post`), UUID primary keys in place of auto-increment ids, camelCase Prisma fields mapped to snake_case columns, `created_at` / `updated_at` added to models that lack them, and implicit many-to-many relations. Laravel and GORM output apply their own frameworks' conventions instead (plural snake_case tables, keys keep their type); see their sections below.
156
164
 
157
165
  ## What is converted
158
166
 
@@ -181,29 +189,31 @@ Most formats produce one text, written to the `-o` file. A format can instead re
181
189
  | Abstract base classes, multi-table inheritance | fields inherited / one-to-one primary key | fields inherited / one-to-one primary key | fields inherited / `#[ORM\Id]` on the one-to-one |
182
190
  | Proxy models (`Meta.proxy`), `Meta.swappable`, `models.CompositePrimaryKey` | merged into the concrete model / resolved / `@@id` | merged into the concrete model / resolved / composite `@PrimaryColumn` | merged into the concrete model / resolved / several `#[ORM\Id]` |
183
191
 
184
- TypeORM output is a single TypeScript file of entity classes. Relations use `Relation<T>` so entities declared in one file do not trip over circular references, and `--provider` picks the column types (`timestamptz` and `jsonb` for PostgreSQL, `datetime` and `json` for MySQL, `simple-json` for SQLite). Use `--naming normalize` for camelCase properties mapped to snake_case columns with `name:` options. `.ts` is not inferred as a format, so pass `--from typeorm` or `--to typeorm`. Reading uses decorators only (see Limitations). TypeORM entities are parsed statically with tree-sitter (no `reflect-metadata`, TypeScript compiler, or database needed), and the same naming modes apply to the result.
192
+ TypeORM output is a single TypeScript file of entity classes. Relations use `Relation<T>` so entities declared in one file do not trip over circular references, and `--provider` picks the column types (`timestamptz` and `jsonb` for PostgreSQL, `datetime` and `json` for MySQL, `simple-json` for SQLite). Use `--naming normalize` for camelCase properties mapped to snake_case columns with `name:` options. `.ts` is not inferred as a format, so pass `--from typeorm` or `--to typeorm`. Reading uses decorators only (see Limitations). TypeORM entities are parsed statically with tree-sitter (no `reflect-metadata`, TypeScript compiler, or database needed), and the same naming modes apply to the result. The tests compile the emitted entities with `tsc`, build TypeORM's metadata for every provider and synchronize the SQLite output into an in-memory database when TypeORM is installed (`TYPEORM_DIR`, see `test/README.md`).
185
193
 
186
194
  Doctrine (`--from doctrine`) reads PHP 8 entity classes with the tree-sitter PHP grammar, so no PHP, Composer or database is needed. Pass the entity directory (one class per file is typical; enums and mapped superclasses can live in other files) or individual files; `.php` is not claimed because Laravel uses it too. Doctrine's default underscore naming is assumed for anything the attributes leave out: the table is the snake_cased class name, the column the snake_cased property, a join column `<property>_id`, an embedded column `<property>_<column>`.
187
195
 
188
- | Doctrine (PHP 8 attributes) | Read as |
189
- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
190
- | `#[ORM\Entity]` (`repositoryClass` ignored), `#[ORM\Table(name:)]` | a model; table `name` or the snake_cased class name |
191
- | `#[ORM\Column]` `type` (or a `Types::` constant), `length`, `precision`, `scale`, `nullable`, `unique`, `name` | string (length 255 by default), text, int, bigint, decimal (10,0 by default), float, boolean, date and time types, json, binary, guid |
192
- | `#[ORM\Column]` without `type` | inferred from the PHP type, as Doctrine does (`int`, `string`, `bool`, `float`, `array`, `DateTime`, `DateTimeImmutable`, `DateInterval`, backed enums) |
193
- | `options: ['default' => ...]` | literal, `now` (`CURRENT_TIMESTAMP`), `uuid` (`gen_random_uuid()`) or enum member defaults |
194
- | `#[ORM\Id]`, `#[ORM\GeneratedValue(strategy:)]`, `#[ORM\CustomIdGenerator]` | primary key; AUTO/IDENTITY/SEQUENCE become auto-increment, UUID (and Symfony `UuidGenerator`) a UUID key, NONE no default |
195
- | several `#[ORM\Id]` | composite primary key |
196
- | `#[ORM\ManyToOne]`, `#[ORM\OneToOne]` with `#[ORM\JoinColumn(name:, referencedColumnName:, nullable:, onDelete:)]` | foreign key / one-to-one (column `<property>_id`, nullable unless `nullable: false`) |
197
- | `#[ORM\OneToMany]`, inverse `#[ORM\OneToOne]`, `mappedBy` / `inversedBy` | the reverse accessor of the owning relation |
198
- | `#[ORM\ManyToMany]` (owning side) | many-to-many (custom `#[ORM\JoinTable]` names are not preserved) |
199
- | `#[ORM\Index]`, `#[ORM\UniqueConstraint]` (class level or inside `#[ORM\Table]`), `Column(unique:, index:)` | indexes, unique constraints (a single unnamed unique column becomes a unique field), `fulltext` flag |
200
- | backed enums (`enum Status: string`) used through `enumType` or the property type | an enum plus an enum-backed column |
201
- | `#[ORM\Embeddable]` / `#[ORM\Embedded(columnPrefix:)]` | the embeddable's columns flattened into the owner, prefixed as Doctrine does |
202
- | `#[ORM\MappedSuperclass]` and traits | columns, relations and indexes inherited |
203
- | `#[ORM\InheritanceType('SINGLE_TABLE')]`, `#[ORM\DiscriminatorColumn]` | subclasses merged into the root table (nullable columns) plus a discriminator column |
204
- | `#[ORM\InheritanceType('JOINED')]` | child table with a one-to-one primary key to the parent |
205
- | `#[ORM\Version]` | integer column defaulting to 1 (optimistic locking is not represented) |
206
- | `#[ORM\HasLifecycleCallbacks]`, lifecycle callbacks, `#[ORM\Cache]`, `#[ORM\OrderBy]`, other libraries' attributes | ignored without a warning |
196
+ | Doctrine (PHP 8 attributes) | Read as |
197
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
198
+ | `#[ORM\Entity]` (`repositoryClass` ignored), `#[ORM\Table(name:)]` | a model; table `name` or the snake_cased class name |
199
+ | `#[ORM\Column]` `type` (or a `Types::` constant), `length`, `precision`, `scale`, `nullable`, `unique`, `name` | string (length 255 by default), text, int, bigint, decimal (10,0 by default), float, boolean, date and time types, json, binary, guid |
200
+ | `#[ORM\Column]` without `type` | inferred from the PHP type, as Doctrine does (`int`, `string`, `bool`, `float`, `array`, `DateTime`, `DateTimeImmutable`, `DateInterval`, backed enums) |
201
+ | `options: ['default' => ...]` | literal, `now` (`CURRENT_TIMESTAMP`), `uuid` (`gen_random_uuid()`) or enum member defaults |
202
+ | `#[ORM\Id]`, `#[ORM\GeneratedValue(strategy:)]`, `#[ORM\CustomIdGenerator]` | primary key; AUTO/IDENTITY/SEQUENCE become auto-increment, UUID (and Symfony `UuidGenerator`) a UUID key, NONE no default |
203
+ | several `#[ORM\Id]` | composite primary key |
204
+ | `#[ORM\ManyToOne]`, `#[ORM\OneToOne]` with `#[ORM\JoinColumn(name:, referencedColumnName:, nullable:, onDelete:)]` | foreign key / one-to-one (column `<property>_id`, nullable unless `nullable: false`) |
205
+ | `#[ORM\OneToMany]`, inverse `#[ORM\OneToOne]`, `mappedBy` / `inversedBy` | the reverse accessor of the owning relation |
206
+ | `#[ORM\ManyToMany]` (owning side) | many-to-many (custom `#[ORM\JoinTable]` names are not preserved) |
207
+ | `#[ORM\Index]`, `#[ORM\UniqueConstraint]` (class level or inside `#[ORM\Table]`), `Column(unique:, index:)` | indexes, unique constraints (a single unnamed unique column becomes a unique field), `fulltext` flag |
208
+ | backed enums (`enum Status: string`) used through `enumType` or the property type | an enum plus an enum-backed column |
209
+ | `#[ORM\Embeddable]` / `#[ORM\Embedded(columnPrefix:)]` | the embeddable's columns flattened into the owner, prefixed as Doctrine does |
210
+ | `#[ORM\MappedSuperclass]` and traits | columns, relations and indexes inherited |
211
+ | `#[ORM\InheritanceType('SINGLE_TABLE')]`, `#[ORM\DiscriminatorColumn]` | subclasses merged into the root table (nullable columns) plus a discriminator column |
212
+ | `#[ORM\InheritanceType('JOINED')]` | child table with a one-to-one primary key to the parent |
213
+ | `#[ORM\Version]` | integer column defaulting to 1 (optimistic locking is not represented) |
214
+ | `#[ORM\PreUpdate]` method assigning `$this->prop = new \DateTimeImmutable();` | the field is "updated automatically"; `#[ORM\PrePersist]` alone means a `now` default. Any other statement in a callback is ignored with a warning |
215
+ | `__construct` assignments and property initialisers (`$this->id = self::generateUuid();`, `= Status::Draft`, `= []`, `= 0`, `= new \DateTimeImmutable()`) | the field default (uuid, enum member, empty JSON, literal, now); a column `options: ['default' => ...]` wins; values that cannot be evaluated warn |
216
+ | `#[ORM\HasLifecycleCallbacks]`, other lifecycle callbacks, `#[ORM\Cache]`, `#[ORM\OrderBy]`, other libraries' attributes | ignored without a warning |
207
217
 
208
218
  Doctrine output (`--to doctrine`) writes a directory, so pass `-o <directory>`. It follows PSR-4: one PHP 8.1+ file per entity (`src/Entity/Post.php`) and one backed enum per enum (`src/Enum/PostStatus.php`), each with `declare(strict_types=1);` and `use Doctrine\ORM\Mapping as ORM;`. `.php` is not inferred, so pass `--to doctrine`.
209
219
 
@@ -215,7 +225,7 @@ Doctrine output (`--to doctrine`) writes a directory, so pass `-o <directory>`.
215
225
  - **Tables and indexes.** `#[ORM\Table(name:)]` plus class-level `#[ORM\Index(columns: [...])]` and `#[ORM\UniqueConstraint(columns: [...])]` on database column names. (`Table(indexes:, uniqueConstraints:)` has no effect in Doctrine ORM 3, so it is not used; ORM 2.19 or newer and PHP 8.1 or newer are required.) Reserved SQL words used as table or column names (`user`, `order`, ...) are written with Doctrine's backtick quoting.
216
226
  - **Naming.** `preserve` keeps the property names of the source (`published_at`) and always writes the table and column names explicitly; `normalize` writes camelCase properties (`publishedAt`) mapped to snake_case columns. Getter and setter names are always camelCase (`getPublishedAt()`).
217
227
  - **Lossy or unsupported.** Arrays and HStore become `json` columns; ranges become strings; durations become `dateinterval` (an ISO 8601 string); `GeneratedField` expressions, views, composite foreign keys, `Unsupported(...)` types, full-text indexes, `@@schema` and other Prisma-only constructs are written as plain tables and columns; a relation to a model without a single-column primary key is skipped; each case warns with the model and field. `onUpdate` actions have no Doctrine equivalent. A relation that points at a non-primary-key column (`to_field`) is written, but Doctrine's `orm:validate-schema` rejects it, and the warning says so. Doctrine ORM is relational, so `--provider mongodb` only warns.
218
- - **Reading.** `--from doctrine` reads the same attributes back, so Doctrine round trips through the shared model.
228
+ - **Reading.** `--from doctrine` reads the same attributes back, the lifecycle callbacks and the constructor and initializer defaults as well, so Doctrine round trips through the shared model. PHP has one empty array literal, so an empty JSON object default (`{}`) comes back as `[]`.
219
229
 
220
230
  Laravel output (`--to laravel`) writes a directory, so pass `-o <directory>` (the project root of a Laravel 11 or 12 app, for example `-o .`). `.php` is not inferred, so pass `--to laravel` (and `--from laravel` to read a project back, described below). Existing files with the same name are overwritten (use `--check` or `--dry-run` first); the migration file names are fixed (see below), so running the conversion again rewrites the same files rather than adding new ones.
221
231
 
@@ -229,7 +239,19 @@ Laravel output (`--to laravel`) writes a directory, so pass `-o <directory>` (th
229
239
  - **Lossy or unsupported.** Arrays and HStore become `json` columns, ranges and durations become strings, `GeneratedField` expressions (Python, not SQL), views, composite foreign keys, `Unsupported(...)` types, full-text indexes, index options, `@@schema` and other Prisma-only constructs are written as plain tables and columns; a relation to a model without a single-column primary key is skipped; each case warns with the model and field. Eloquent has no composite primary keys: the migration gets `primary([...])` and the model a warning. An auto-updated column that is not part of `timestamps()` is only refreshed by MySQL (`useCurrentOnUpdate()`). Laravel does not map PostgreSQL-specific types, so `--provider` only chooses `jsonb` versus `json` and the MySQL form of JSON defaults.
230
240
  - **Not converted.** Policies, factories, seeders, observers, morph relations and anything else outside the schema are not generated, and the models extend `Illuminate\Database\Eloquent\Model` (not `Authenticatable`).
231
241
 
232
- Graphene output (`--to graphene`) is write-only and pairs with Django models: it writes one Python file that imports every model from `.models` (generate it with `--to django`, or use your own models) and defines a `DjangoObjectType` per model with an explicit `Meta.fields` list (forward and reverse relations included), a `Query` with a single-item field (`post(id)`) and a list field (`post_list`) per model, `Create`/`Update`/`Delete` mutations built on `graphene.Mutation`, and a final `schema = graphene.Schema(query=Query, mutation=Mutation)`. Inputs map the scalar types to `String`, `Int`, `BigInt`, `Float`, `Decimal`, `Boolean`, `DateTime`, `Date`, `Time`, `UUID` and `JSONString`; a field is required when it is not nullable and has no default, and relations are `ID` inputs (`author_id`, many-to-many `tags_ids`). Enum-backed fields rely on graphene-django's choice conversion for output and are `String` inputs validated by the model. Binary columns and relations to models outside the schema are left out, and models with a composite primary key get only a list query and a create mutation; each case produces a warning naming the model and field. Field names are snake_case like the Django output, `.py` stays owned by Django so pass `--to graphene`, and the naming mode has no effect. Requires graphene-django 3.x at runtime.
242
+ GORM output (`--to gorm`) is write-only and writes a directory, so pass `-o <directory>`: one Go file per model (`models/post.go`, snake_case) and one per enum (`models/post_status.go`), all in the same package, each importing only what it uses and formatted exactly as `gofmt` would (the tests run `gofmt -l`, `go vet` and a SQLite `AutoMigrate` with the real GORM when Go is installed). `.go` is not inferred, so pass `--to gorm`.
243
+
244
+ - **Package and paths.** The package is `models` and the files go in a directory of that name; `--go-package store` (or `goPackage` in the config file, or the `goPackage` option of `emitGorm` / `convertText`) writes `store/post.go` with `package store`. The name must be a Go identifier that is not a keyword.
245
+ - **Fields.** Exported, typed fields with a `gorm:"..."` tag: `string` (`size:n`), `string` with `type:text`, `int32`, `int64`, `float64`, `bool`, `time.Time` (`type:date` for dates), `uuid.UUID` ([google/uuid](https://github.com/google/uuid), `type:uuid` on PostgreSQL, `char(36)` on MySQL), `decimal.Decimal` ([shopspring/decimal](https://github.com/shopspring/decimal) with `type:decimal(p,s)`), `datatypes.JSON` ([gorm.io/datatypes](https://github.com/go-gorm/datatypes)) and `[]byte`. A nullable column is a pointer (`*string`, `*time.Time`, `*uuid.UUID`); `datatypes.JSON` and `[]byte` hold nil themselves. Tags use `column:` (only when GORM would derive another name from the field), `size:`, `primaryKey`, `autoIncrement` (`autoIncrement:false` for a lone integer key without one, because GORM would otherwise add it), `not null`, `unique`, `default:`, `autoCreateTime` / `autoUpdateTime` and the index tags below. A field name is the IR name in Go style (`public_id` becomes `PublicID`).
246
+ - **Defaults.** Literal and enum defaults are `default:` tags. A `now` default is `autoCreateTime` and an auto-updated column is `autoUpdateTime`. A UUID default is `default:gen_random_uuid()` on PostgreSQL and a generated `BeforeCreate` hook (`uuid.New()`, or `uuid.NewV7()` for version 7) everywhere else, so the key is known after `Create` on every database.
247
+ - **gorm.Model and soft delete.** A model with exactly the `gorm.Model` columns (a big-integer auto-increment `id`, date-time `created_at` and an auto-updated `updated_at`, and a nullable, indexed `deleted_at`) embeds `gorm.Model`, with its other fields after it. A nullable date-time named `deleted_at` on any other model is a `gorm.DeletedAt` field, with a warning, because GORM then hides rows where it is set.
248
+ - **Relations.** Every relation is written on both sides. A foreign key is a typed `<Relation><Key>` field (`AuthorID`) plus the association (`Author User` for a required parent that cannot make the type recursive, otherwise `*User`), tagged `foreignKey:AuthorID` (and `references:` for a non-key target) and `constraint:OnDelete:CASCADE` / `OnUpdate:...`, on both the belongs-to and the has-one (`*Profile`) or has-many (`[]Post`) side. Reverse names come from `related_name` or the plural of the model (`Posts`). Many-to-many is `[]Tag` with `many2many:<table>_<relation>`, plus `joinForeignKey` / `joinReferences` when the join columns differ from GORM's (always for a self relation), and `OnDelete:CASCADE` on both sides, since GORM builds the join table from whichever struct it migrates first. Keys that are relations (multi-table inheritance, composite keys of foreign keys) get `primaryKey` on the foreign key field.
249
+ - **Tables and indexes.** `func (Post) TableName() string` only when the table is not what GORM derives from the type name (`blog_post`, but not `posts`), using GORM's own naming and pluralization rules (checked against `gorm.io/gorm` in the tests). Indexes are tags on the fields: `index` / `uniqueIndex`, `index:name`, and for composite indexes a shared name with `priority:n` (`idx_<table>_<columns>` when the source has no name).
250
+ - **Enums.** A typed string (`type PostStatus string`) with a `const` block in its own file; labels become trailing comments. The column has the enum type and a `default:` for an enum default.
251
+ - **Naming.** `preserve` keeps the source's table and column names (explicit `TableName()` / `column:` wherever GORM's convention would differ). `normalize` applies GORM's conventions: plural snake_case tables (`posts`, join tables keep their names), snake_case columns, and `created_at` / `updated_at` where missing; primary keys keep their type (unlike Prisma output, no UUID keys are introduced).
252
+ - **Lossy or unsupported.** Integers are signed `int32` / `int64` (the IR has no unsigned types). Arrays become `datatypes.JSONSlice[T]`, HStore `datatypes.JSON`, durations `time.Duration` (nanoseconds in a bigint), ranges strings; generated columns, views, composite foreign keys, `Unsupported(...)` columns (written as `string` with `type:<name>`), full-text indexes and index options, `@@schema` and other Prisma-only constructs are written as plain tables and columns; a relation to a model without a single-column primary key is skipped; each case warns with the model and field. The IR has no check constraints, column comments or polymorphic relations, so no `check:`, `comment:` or `polymorphic:` tags are written. GORM is relational, so `--provider mongodb` only warns. The output needs `gorm.io/gorm`, plus `github.com/google/uuid`, `github.com/shopspring/decimal` and `gorm.io/datatypes` for the types that use them (`go get` them in your module).
253
+
254
+ Graphene output (`--to graphene`) is write-only and pairs with Django models: it writes one Python file that imports every model from `.models` (generate it with `--to django`, or use your own models) and defines a `DjangoObjectType` per model with an explicit `Meta.fields` list (forward and reverse relations included), a `Query` with a single-item field (`post(id)`) and a list field (`post_list`) per model, `Create`/`Update`/`Delete` mutations built on `graphene.Mutation`, and a final `schema = graphene.Schema(query=Query, mutation=Mutation)`. Inputs map the scalar types to `String`, `Int`, `BigInt`, `Float`, `Decimal`, `Boolean`, `DateTime`, `Date`, `Time`, `UUID` and `JSONString`; a field is required when it is not nullable and has no default, and relations are `ID` inputs (`author_id`, many-to-many `tags_ids`). Enum-backed fields rely on graphene-django's choice conversion for output and are `String` inputs validated by the model. Binary columns and relations to models outside the schema are left out, and models with a composite primary key get only a list query and a create mutation; each case produces a warning naming the model and field. Field names are snake_case like the Django output, `.py` stays owned by Django so pass `--to graphene`, and the naming mode has no effect. Requires graphene-django 3.x at runtime. The tests import the generated schema next to the generated Django models with the real Django and graphene-django when they are installed (`DJANGO_PYTHON`), build it, run the introspection query and create, read, update and delete rows through it.
233
255
 
234
256
  Django-only constructs: a proxy model (`Meta.proxy = True`) has no table of its own, so it is merged into its concrete model (chains of proxies are followed) and relations that target it are pointed at the concrete model, with a warning. A model with `Meta.swappable = "AUTH_USER_MODEL"` is used as the target of `settings.AUTH_USER_MODEL` and `get_user_model()` instead of an assumed `User`. Custom managers (`objects = MyManager()`, `Manager.from_queryset(...)()`, `QuerySet.as_manager()`) and the classes behind them are ignored without warnings. `django.contrib.postgres` arrays, HStore and range fields, and `GeneratedField` / `db_default` (Django 5.0+), round-trip through `--to django`; the Django emitter writes the `django.contrib.postgres.fields` import and notes the required Django version in a warning.
235
257
 
@@ -271,6 +293,30 @@ Pass the project root (only `database/migrations` and `app/` are read; `vendor/`
271
293
 
272
294
  Everything is taken from the migrations and the models together, so a relation can come from a foreign key constraint, from a `belongsTo`, or from the `hasMany` on the other side; a foreign key column with none of the three is a plain column.
273
295
 
296
+ ### GORM (`--from gorm`)
297
+
298
+ GORM has no schema file: the schema is the Go structs and their `gorm:"..."` tags. `--from gorm` reads them with the tree-sitter Go grammar (no Go toolchain or database is needed, and no Go code is run). Pass the directory that holds the models, or the files; every `.go` file is read, except `*_test.go` and anything below `vendor/`, `testdata/`, `node_modules/` and `.git/`. `.go` is not claimed, so pass `--from gorm`. GORM is read only for now: there is no `--to gorm` yet.
299
+
300
+ GORM does not mark a model, so a struct is read as one when it embeds `gorm.Model`, has a `gorm:"..."` tag, has a field called `ID`, has a `TableName()` method, or is the target of an association from another model. A struct that is only embedded in others (a shared base) is not a model of its own; unexported fields, `gorm:"-"` fields and `-:migration` fields are not columns.
301
+
302
+ Names follow GORM's own conventions, so the database names are reproduced exactly: tables are the pluralised snake_case struct name (`BlogPost` becomes `blog_posts`; the plural rules are those of `jinzhu/inflection`, which GORM uses) unless `TableName()` returns another literal or constant, columns are the snake_case field name (`PublicID` becomes `public_id`, with GORM's initialisms such as `ID`, `URL` and `HTTP`) unless `column:` says otherwise, a field called `ID` is the primary key, and a foreign key is `<Field>ID` (`AuthorID` for the field `Author`). The names were checked against GORM v1.31 (`gorm.io/gorm/schema`) for the test fixtures. Struct names are the model names; field names become camelCase (`PublicID` becomes `publicId`).
303
+
304
+ | GORM | Read as |
305
+ | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
306
+ | `string`, `bool`, `int*`, `uint*`, `float*`, `[]byte` | `text` (`string` with a length when `size:` is given), `boolean`, `int` up to 32 bits and `bigInt` above (as in GORM's PostgreSQL dialect, so `int`, `int64`, `uint` and `uint32` are `bigInt`), `float`, `bytes` |
307
+ | `time.Time`, `time.Duration`, `uuid.UUID`, `decimal.Decimal`, `datatypes.JSON`, `datatypes.Date`, `net.IP` | `dateTime`, `bigInt`, `uuid`, `decimal`, `json`, `date`, `ipAddress` |
308
+ | pointers, `sql.NullString` and the other `sql.Null*` types, `sql.Null[T]`, `gorm.DeletedAt` | a nullable column; a plain (non-pointer) field is required, as the Go code treats it (AutoMigrate itself only adds `NOT NULL` for `not null` and primary keys) |
309
+ | `type:`, `size:`, `precision:`, `scale:`, `serializer:json` | the SQL type (`varchar(n)`, `numeric(p,s)`, `jsonb`, arrays such as `text[]`, ...), length, digits and scale; a float with a precision is a `decimal`; an unknown SQL type is an unsupported column |
310
+ | `column:`, `primaryKey`, `autoIncrement`, `unique`, `not null`, `default:` | column name, primary key (several make a composite key; an integer key auto-increments unless `autoIncrement:false`), unique, required, defaults (`now()`, `gen_random_uuid()`, literals, expressions) |
311
+ | `index`, `uniqueIndex` (named, composite with `priority:` or `composite:`), `sort:`, `length:`, `class:FULLTEXT`, `type:` | indexes; a single unnamed unique index becomes a unique field |
312
+ | `CreatedAt`, `UpdatedAt`, `autoCreateTime`, `autoUpdateTime` | a creation column defaulting to now, an update column refreshed on every save |
313
+ | `gorm.Model`, `embedded`, `embeddedPrefix:`, anonymous embedded structs | the columns flattened into the owner, in order, with the prefix applied to the column names (a field of the owner shadows a promoted field of the same name) |
314
+ | `gorm.DeletedAt` (soft delete) | a nullable timestamp column, with a warning that GORM's query filtering is not represented |
315
+ | belongs to, has one, has many (`foreignKey:`, `references:`, composite keys, `constraint:OnDelete:...,OnUpdate:...`) | a foreign key or one-to-one relation with its reverse name, found the way GORM finds it (by convention or by the tags); the foreign key field is replaced by the relation; composite keys become composite foreign keys |
316
+ | `many2many:table` (`joinForeignKey:`, `joinReferences:`), one or both sides declared | a many-to-many field with its reverse name; a join table or column name that differs from the derived one is not preserved (warning) |
317
+ | `type Status string` with typed constants | an enum (`StatusDraft` is the member `Draft`); the column keeps its length and an enum default |
318
+ | `TableName()` returning a literal or a constant | the table name |
319
+
274
320
  ### Prisma constructs
275
321
 
276
322
  The Prisma parser and emitter cover more than the Django mapping above. Constructs the shared model can carry survive a Prisma → Prisma round trip; the other formats get the closest equivalent and a warning naming the model and field.
@@ -318,15 +364,20 @@ ormbridge never fails silently on something it cannot represent: each case produ
318
364
  - Prisma's implicit many-to-many join table (`_AToB`) differs from Django's, so data needs migrating.
319
365
  - TypeORM: entities are read from decorators only. Not supported, each with a warning naming the entity and column: `EntitySchema`, `@ChildEntity` / `@TableInheritance` (single-table inheritance), `@ViewEntity`, `@Tree*`, `@ObjectIdColumn`, `@VirtualColumn`, array columns, partial and spatial indexes, `@Check` / `@Exclusion`, composite foreign keys, relations inside embedded entities, and column options such as `unsigned`, `collation` and `transformer`. Custom `@JoinTable` names are not preserved. Relations without `onDelete` become `NoAction` and relations are nullable unless `nullable: false`, as in TypeORM. Numeric enums become integers.
320
366
  - TypeORM many-to-many relations use TypeORM's join table (composite key), so Django's surrogate `id` column on the join table is not reproduced. SQL Server has no enum column, so enums become `varchar`. Database-side UUID defaults are not available on SQLite. MongoDB entities are not supported.
321
- - Doctrine: only PHP 8 attributes are read. Docblock annotations (`@ORM\Entity`) are detected and reported with a warning (or an error when nothing else is found), and XML / YAML mappings are not read; both are planned. Not supported, each with a warning naming the entity and property: attribute and association overrides, composite foreign keys (several `#[ORM\JoinColumn]`), `columnDefinition`, `unsigned` / `comment` / `collation` and other column `options`, `insertable: false` / `updatable: false`, partial and spatial indexes, table `schema` and `options`, custom id generators and `#[ORM\SequenceGenerator]`, `array` / `object` / `simple_array` / custom DBAL types, int-backed and non-backed enums, relations inside embeddables, and the `#[ORM\DiscriminatorMap]` values (the discriminator column is kept, the map is not). Nullability follows the attribute (`nullable: true`), never the PHP type: Doctrine does not infer it, so `?string` with a plain `#[ORM\Column]` is `NOT NULL`. Custom join table names, ORM-level `cascade` / `fetch` / `orphanRemoval` and other runtime-only settings are not part of the schema and are not converted; `cascade: ['remove']` and `orphanRemoval` warn. A custom naming strategy configured outside the attributes cannot be seen, so Doctrine's underscore naming is assumed. Classes the input does not contain (a vendor base class or trait, an enum in another package) produce a warning that names the missing class.
367
+ - Doctrine: only PHP 8 attributes are read. Docblock annotations (`@ORM\Entity`) are detected and reported with a warning (or an error when nothing else is found), and XML / YAML mappings are not read; both are planned. Lifecycle callbacks other than a plain timestamp assignment, and constructor or initializer values that need to run PHP (method calls, constants other than enum cases), are ignored with a warning. Not supported, each with a warning naming the entity and property: attribute and association overrides, composite foreign keys (several `#[ORM\JoinColumn]`), `columnDefinition`, `unsigned` / `comment` / `collation` and other column `options`, `insertable: false` / `updatable: false`, partial and spatial indexes, table `schema` and `options`, custom id generators and `#[ORM\SequenceGenerator]`, `array` / `object` / `simple_array` / custom DBAL types, int-backed and non-backed enums, relations inside embeddables, and the `#[ORM\DiscriminatorMap]` values (the discriminator column is kept, the map is not). Nullability follows the attribute (`nullable: true`), never the PHP type: Doctrine does not infer it, so `?string` with a plain `#[ORM\Column]` is `NOT NULL`. Custom join table names, ORM-level `cascade` / `fetch` / `orphanRemoval` and other runtime-only settings are not part of the schema and are not converted; `cascade: ['remove']` and `orphanRemoval` warn. A custom naming strategy configured outside the attributes cannot be seen, so Doctrine's underscore naming is assumed. Classes the input does not contain (a vendor base class or trait, an enum in another package) produce a warning that names the missing class.
322
368
  - Laravel: the schema is rebuilt statically, so what Laravel decides at run time is not seen. A conditional or loop inside a migration is applied as if it always ran, and a dynamic table or column name is skipped; both warn and name the table. Raw SQL (`DB::statement`, `DB::unprepared`) is not interpreted, so a view, trigger, partial index or column created that way is missing, with a warning naming the table. Not represented, each with a warning naming the table and column: polymorphic relations (`morphs`, `morphTo`, `morphMany`, `morphToMany`; the `_type` and `_id` columns stay plain columns), derived relations (`hasManyThrough`, `hasOneThrough`, `*OfMany`), relation constraints (`->where(...)`), composite foreign keys, foreign keys to tables no migration creates, tables that migrations alter but never create (for example `users` from a package), `set`, geometry and `vector` columns, `macAddress` (kept as a string), identity columns, spatial indexes, custom pivot table and key names (the join table gets the name other formats derive: `blog_post_tags` survives, `post_tag` does not), pivot timestamps and non-cascading pivot keys, and `parentKey` / `relatedKey` that are not the primary key. Casts to custom cast classes and to int-backed enums are ignored. Mass-assignment and visibility properties (`$fillable`, `$guarded`, `$hidden`) are not part of the schema. Soft deletes have no IR equivalent beyond the nullable `deleted_at` column.
369
+ - GORM: only struct tags are read and nothing is executed, so a `TableName()` that computes its result, a custom `NamingStrategy` (prefix, `SingularTable`, `NoLowerCase`) set when the database is opened, and `Scanner` / `Valuer` types are not seen: the default naming is assumed, and such a type is an unsupported column unless a `type:` tag names the column type. Not represented, each with a warning naming the struct and field: polymorphic associations (`polymorphic:`; the `<Name>ID` and `<Name>Type` columns stay plain fields), `check:` constraints, column `comment:`, partial (`where:`) and expression indexes, soft delete beyond the nullable `deleted_at` column, integer-backed constant types (a plain integer column), `autoCreateTime` / `autoUpdateTime` on integer fields (Unix time), custom join table and column names, and `serializer:` values other than `json`, `gob` and `unixtime`. GORM ignores a `constraint:` tag on a belongs-to field when the other side describes the same key, and so does the parser (with a warning). Slices and maps without a `type:` or `serializer:` tag, which GORM cannot migrate, are read as arrays and `json` with a warning. Unsigned integers need one more bit in the type mapping, as in GORM's PostgreSQL dialect (`uint32` is `bigInt`).
323
370
  - Generated names for Django indexes are shortened to Django's 30-character limit.
324
371
 
325
372
  Always review the output and run your own migrations/`prisma validate` before applying it to a real database.
326
373
 
374
+ ### Verified against real tools
375
+
376
+ The emitters are not only compared with golden files. When the tools are installed, the tests also load the output with the real thing: Django (`manage.py check`, `makemigrations`, `sqlmigrate`, `migrate` and a comparison of the model metadata and the SQLite database with the schema), graphene-django (the generated schema is built, introspected and queried), TypeORM (`tsc` with decorator metadata, TypeORM's metadata validation for every provider and a `synchronize` into in-memory SQLite), Doctrine, Laravel, GORM and `prisma validate`. These checks are optional: each is skipped with a reason when its tool is missing, and `test/README.md` lists the environment variables (`DJANGO_PYTHON`, `TYPEORM_DIR`, `DOCTRINE_DIR`, `LARAVEL_DIR`, `PRISMA_BIN`) and `test/tools/setup-verification-tools.sh`, which installs the Django and TypeORM tools into a scratch directory.
377
+
327
378
  ### Conversion matrix
328
379
 
329
- [docs/CONVERSION_MATRIX.md](./docs/CONVERSION_MATRIX.md) shows, for every pair of readable and writable formats (Django, Prisma, TypeORM), whether the schema survives a round trip and exactly what is lost when it does not (for example enum labels and column lengths, and Prisma's explicit join model for many-to-many fields). It is generated from the test fixtures with `npm run docs:matrix`, and the tests fail if it is out of date.
380
+ [docs/CONVERSION_MATRIX.md](./docs/CONVERSION_MATRIX.md) shows, for every pair of readable and writable formats (Django, Prisma, TypeORM, Doctrine, Laravel, GORM), whether the schema survives a round trip and exactly what is lost when it does not (for example enum labels and column lengths, and Prisma's explicit join model for many-to-many fields). It is generated from the test fixtures with `npm run docs:matrix`, and the tests fail if it is out of date.
330
381
 
331
382
  Django models are read with a static [tree-sitter](https://tree-sitter.github.io/) parser, so **no Python, Django install, or database is needed**.
332
383
 
@@ -355,7 +406,7 @@ if (!result.ok) {
355
406
  }
356
407
  ```
357
408
 
358
- All functions return a `Result` (`{ ok: true, value } | { ok: false, error }`) instead of throwing, with a descriptive error code and message. Parsers and emitters are exported too (`parseDjango`, `parsePrisma`, `parseTypeorm`, `parseDoctrine`, `parseLaravel`, `emitPrisma`, `emitDjango`, `emitDoctrine`, `emitLaravel`), all built on a shared intermediate representation, which is how new formats plug in.
409
+ All functions return a `Result` (`{ ok: true, value } | { ok: false, error }`) instead of throwing, with a descriptive error code and message. Parsers and emitters are exported too (`parseDjango`, `parsePrisma`, `parseTypeorm`, `parseDoctrine`, `parseLaravel`, `emitPrisma`, `emitDjango`, `emitDoctrine`, `emitLaravel`, `emitGorm`), all built on a shared intermediate representation, which is how new formats plug in.
359
410
 
360
411
  ### Format registry
361
412
 
package/dist/cliRunner.js CHANGED
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';
2
2
  import { extname, isAbsolute, relative, resolve } from 'node:path';
3
3
  import { Command, CommanderError } from 'commander';
4
4
  import { findConfigFile, loadConfigFile, } from './config.js';
5
- import { PRISMA_PROVIDERS } from './emitters/prisma.js';
5
+ import { PRISMA_PROVIDERS, } from './emitters/prisma.js';
6
6
  import { describeFormats, getFormat, getFormatByExtension, listFormatNames, listFormats, } from './formats.js';
7
7
  import { countLines, runConversion, } from './io.js';
8
8
  /** Exit codes of the `ormbridge` command. */
@@ -61,6 +61,14 @@ function buildRunOptions(settings, mode) {
61
61
  if (autoFieldValue !== 'int' && autoFieldValue !== 'bigint') {
62
62
  return failure('INVALID_OPTION', `Invalid --auto-field value "${settings.autoField ?? ''}". Expected "int" or "bigint".`);
63
63
  }
64
+ let prismaVersion;
65
+ if (settings.prismaVersion !== undefined) {
66
+ const versionText = String(settings.prismaVersion).trim();
67
+ if (versionText !== '6' && versionText !== '7') {
68
+ return failure('INVALID_OPTION', `Invalid --prisma-version value "${String(settings.prismaVersion)}". Expected 6 or 7.`);
69
+ }
70
+ prismaVersion = versionText === '7' ? 7 : 6;
71
+ }
64
72
  return {
65
73
  ok: true,
66
74
  value: {
@@ -80,6 +88,10 @@ function buildRunOptions(settings, mode) {
80
88
  ...(settings.namespace === undefined
81
89
  ? {}
82
90
  : { namespace: settings.namespace }),
91
+ ...(settings.goPackage === undefined
92
+ ? {}
93
+ : { goPackage: settings.goPackage }),
94
+ ...(prismaVersion === undefined ? {} : { prismaVersion }),
83
95
  },
84
96
  };
85
97
  }
@@ -151,6 +163,12 @@ function planRuns(flags, headerFromFlag, config, env, mode) {
151
163
  if (flags.namespace !== undefined) {
152
164
  settings.namespace = flags.namespace;
153
165
  }
166
+ if (flags.goPackage !== undefined) {
167
+ settings.goPackage = flags.goPackage;
168
+ }
169
+ if (flags.prismaVersion !== undefined) {
170
+ settings.prismaVersion = flags.prismaVersion;
171
+ }
154
172
  const options = buildRunOptions(settings, mode);
155
173
  if (!options.ok) {
156
174
  const where = label === undefined ? '' : `conversion ${label}: `;
@@ -305,6 +323,8 @@ export async function runCli(argv, env) {
305
323
  .option('--app-label <name>', 'Django app label used for default table names (default: derived from the directory)')
306
324
  .option('--auto-field <type>', 'primary key type for Django models without one (int | bigint) (default: int)')
307
325
  .option('--namespace <name>', 'PHP namespace of the Doctrine entities (default: App\\Entity) or Laravel models (default: App\\Models)')
326
+ .option('--go-package <name>', 'Go package name of the GORM models (default: models)')
327
+ .option('--prisma-version <version>', 'Prisma major version of the generator and datasource blocks (6 | 7) (default: 6; 7 writes the prisma-client generator and no datasource url)')
308
328
  .option('--dry-run', 'run the conversion and report what would be written, without touching any file')
309
329
  .option('--check', 'exit with code 3 if an output file is missing or differs from the conversion; writes nothing')
310
330
  .option('--config <path>', 'read settings from this JSON config file instead of searching for ormbridge.config.json')
@@ -1 +1 @@
1
- {"version":3,"file":"cliRunner.js","sourceRoot":"","sources":["../src/cliRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACL,cAAc,EACd,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAuB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,WAAW,GAGZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,UAAU,EACV,aAAa,GAId,MAAM,S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AE,CAAC,GAAG,KAAK,UAAU,IAAI,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,CACnE,CAAC;QACJ,IAAI,QAAQ,EAAE,CAAC;YACb,GAAG,CAAC,MAAM,CACR,+DAA+D,CAChE,CAAC;YACF,QAAQ,GAAG,gBAAgB,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,MAAM,cAAc,GAClB,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,KAAK;YAC9C,CAAC,CAAC,KAAK,CAAC,MAAM;YACd,CAAC,CAAC,SAAS,CAAC;QAChB,QAAQ,GAAG,MAAM,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEL,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CACV,gGAAgG,CACjG;SACA,MAAM,CAAC,GAAS,EAAE;QACjB,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,IAAI,MAAM,YAAY,cAAc,EAAE,CAAC;YACrC,4EAA4E;YAC5E,OAAO,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;QAC5D,CAAC;QACD,MAAM,MAAM,CAAC;IACf,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/dist/config.d.ts CHANGED
@@ -18,6 +18,10 @@ export interface ConversionConfig {
18
18
  autoField?: 'int' | 'bigint';
19
19
  /** PHP namespace of the Doctrine entities or Laravel models. */
20
20
  namespace?: string;
21
+ /** Go package name of the GORM models. */
22
+ goPackage?: string;
23
+ /** Prisma major version of the generated header (6 or 7). */
24
+ prismaVersion?: 6 | 7;
21
25
  }
22
26
  /** A parsed config file. Top-level settings are defaults shared by every entry in `conversions`. */
23
27
  export interface ConfigFile {
package/dist/config.js CHANGED
@@ -19,6 +19,8 @@ const CONVERSION_KEYS = [
19
19
  'appLabel',
20
20
  'autoField',
21
21
  'namespace',
22
+ 'goPackage',
23
+ 'prismaVersion',
22
24
  ];
23
25
  /**
24
26
  * Looks for a config file in `startDirectory` and each parent directory. The
@@ -143,7 +145,14 @@ function parseConversion(raw, prefix, baseDirectory) {
143
145
  return err('INVALID_CONFIG', `unknown key "${prefix}${key}". Valid keys: ${valid.join(', ')}.`);
144
146
  }
145
147
  }
146
- for (const key of ['name', 'from', 'to', 'appLabel', 'namespace']) {
148
+ for (const key of [
149
+ 'name',
150
+ 'from',
151
+ 'to',
152
+ 'appLabel',
153
+ 'namespace',
154
+ 'goPackage',
155
+ ]) {
147
156
  const value = raw[key];
148
157
  if (value === undefined) {
149
158
  continue;
@@ -184,6 +193,13 @@ function parseConversion(raw, prefix, baseDirectory) {
184
193
  }
185
194
  config.provider = provider;
186
195
  }
196
+ const prismaVersion = raw['prismaVersion'];
197
+ if (prismaVersion !== undefined) {
198
+ if (prismaVersion !== 6 && prismaVersion !== 7) {
199
+ return fail('prismaVersion', `must be the number 6 or 7 (got ${describeValue(prismaVersion)}).`);
200
+ }
201
+ config.prismaVersion = prismaVersion;
202
+ }
187
203
  const header = raw['header'];
188
204
  if (header !== undefined) {
189
205
  if (typeof header !== 'boolean') {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,E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