prisma-dbml-generator
prisma-dbml-generator copied to clipboard
Prisma DBML Generator
Hey, there is some niche error for complex models (many to many) ```sh TypeError: Cannot read properties of undefined (reading 'type') at getJoinIdType (/prisma-dbml-generator/dist/generator/many-to-many-tables.js:46:28) at joinField (/prisma-dbml-generator/dist/generator/many-to-many-tables.js:39:47) ``` I did...
Generate table groups: https://dbdiagram.io/docs/table-groups, with some mechanism example: ` /// @TableGroup("tenant") model Account { id String @id ... } /// @TableGroup("tenant") model User { id String @id ... } `...
Seems like Prisma's `multiSchema` previewFeature does not work with the latest version (0.10.0). Are we waiting for it to be on GA? or is this something we can implement already?
When using the Prisma schema with a uuid type, the DBML output is incorrectly mapping the field as string instead of uuid. ### Example Prisma Schema (input): ``` model User...
In line 91 of table.ts, replace : ```typescript return ` ${field.name} ${fieldType}${generateColumnDefinition(field)}`; ``` by ```typescript return ` ${mapToDbSchema && field.dbName ? field.dbName : field.name} ${fieldType}${generateColumnDefinition(field)}`; ```
I noticed that id columns are displayed as if it's nullable when deployed to dbdocs. For example, this prisma schema produces such dbml modeling which lucks `not null` annotation for...
Fixes #60 all the tests all passing except https://github.com/notiz-dev/prisma-dbml-generator/issues/62 To create tests for this the exact Unicode has to be verified, as the current new lines are still valid in...
``` > [email protected] test > jest PASS __tests__/table.test.ts PASS __tests__/dbml.test.ts PASS __tests__/enums.test.ts PASS __tests__/relations.test.ts FAIL __tests__/project.test.ts ● Project › generate a project block with noteMd expect(received).toEqual(expected) // deep equality -...
When using Prisma's triple-slash (///) documentation comments that span multiple lines (e.g. for JSON examples), the generator creates DBML with unescaped newlines in string literals, producing invalid DBML syntax (at...
To well organize prisma schema files, I enabled prismaSchemaFolder, however the generator cannot generate model from other prisma file into sql blocks Any idea?