You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Relation preservation** — indexes, unique constraints maintained across all conversions
193
193
-**Custom type handling** — dialect-specific types (JSONB, etc.) pass through via CUSTOM type
194
+
-**Custom type mapping overrides** — override type mappings per format with YAML/JSON config files
195
+
196
+
## Custom Type Mappings
197
+
198
+
Override the default type mappings with a YAML or JSON configuration file. This is useful when you need format-specific types not covered by the defaults.
199
+
200
+
### Config file format
201
+
202
+
```yaml
203
+
# schemaforge-types.yaml
204
+
overrides:
205
+
sql:
206
+
STRING: "VARCHAR({length})"
207
+
UUID: "UUID"
208
+
prisma:
209
+
STRING: "String @db.VarChar({length})"
210
+
UUID: "String @uuid"
211
+
sqlalchemy:
212
+
STRING: "Unicode({length})"
213
+
UUID: "Uuid"
214
+
django:
215
+
STRING: "CharField(max_length={length})"
216
+
typeorm:
217
+
UUID: "uuid"
218
+
```
219
+
220
+
**Placeholders:** `{length}`, `{precision}`, `{scale}`, `{values}` — these are replaced with the column's type arguments when generating.
0 commit comments