Skip to content

Commit c6925d2

Browse files
fix: prisma file structure spacing
1 parent 6f192b2 commit c6925d2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/desktop/src/entities/connection/utils/generators/prisma.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ export function generateSchemaPrisma({ table, columns, enums = [], dialect = Con
147147
})
148148

149149
const body = cols.join('\n')
150-
+ (relations.length ? `\n\n${relations.join('\n')}` : '')
151-
+ (indexBlocks.length ? `\n\n${indexBlocks.join('\n')}` : '')
150+
+ (relations.length ? `\n${relations.join('\n')}` : '')
151+
+ (indexBlocks.length ? `\n${indexBlocks.join('\n')}` : '')
152152

153153
const uniqueExtras = Array.from(new Set(extraBlocks))
154154

apps/desktop/src/entities/connection/utils/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type ${pascalName} = z.infer<typeof ${camelName}Schema>;`
2828

2929
export function prismaSchemaTemplate(table: string, columns: string) {
3030
const modelName = safePascalCase(table)
31-
const mapAttribute = modelName !== table ? `\n @@map("${table}")` : ''
31+
const mapAttribute = modelName !== table ? `\n\n @@map("${table}")` : ''
3232
return `model ${modelName} {
3333
${columns}${mapAttribute}
3434
}`

0 commit comments

Comments
 (0)