Skip to content

Commit

Permalink
set default for mapToDbSchema to false
Browse files Browse the repository at this point in the history
  • Loading branch information
marcjulian committed Mar 18, 2022
1 parent 9c23da7 commit 666e982
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli/dbml-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export async function generate(options: GeneratorOptions) {

const dbmlSchema = generateDBMLSchema(
options.dmmf,
mapToDbSchema,
allowManyToMany,
mapToDbSchema,
projectOptions
);

Expand Down
2 changes: 1 addition & 1 deletion src/generator/dbml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/generator/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 666e982

Please sign in to comment.