diff --git a/src/cli/dbml-generator.ts b/src/cli/dbml-generator.ts index 1d316f1..0b79526 100644 --- a/src/cli/dbml-generator.ts +++ b/src/cli/dbml-generator.ts @@ -25,8 +25,8 @@ export async function generate(options: GeneratorOptions) { const dbmlSchema = generateDBMLSchema( options.dmmf, - mapToDbSchema, allowManyToMany, + mapToDbSchema, projectOptions ); diff --git a/src/generator/dbml.ts b/src/generator/dbml.ts index e313001..6bf9320 100644 --- a/src/generator/dbml.ts +++ b/src/generator/dbml.ts @@ -11,8 +11,8 @@ export const autoGeneratedComment = `//// -------------------------------------- export function generateDBMLSchema( dmmf: DMMF.Document, - mapToDbSchema: boolean, allowManyToMany: boolean = true, + mapToDbSchema: boolean = false, projectOptions?: ProjectOptions ): string { const tables = generateTables(dmmf.datamodel.models, mapToDbSchema); diff --git a/src/generator/table.ts b/src/generator/table.ts index eaf8656..008cc0f 100644 --- a/src/generator/table.ts +++ b/src/generator/table.ts @@ -3,7 +3,7 @@ import { DMMF } from '@prisma/generator-helper'; export function generateTables( models: DMMF.Model[], - mapToDbSchema: boolean + mapToDbSchema: boolean = false ): string[] { return models.map((model) => { let modelName = model.name;