Bug description
How to reproduce
- Save this schema:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = "postgresql://siddhant@localhost:5432/throwaway"
}
model User {
id Int @id
name String
// Comment
email String @unique
// Comment 2
}
- When you run
prisma format / save in the VSCode extension, the schema becomes:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = "postgresql://siddhant@localhost:5432/throwaway"
}
// Comment 2
model User {
id Int @id
name String
// Comment
email String @unique
}
Expected behavior
The schema should be:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = "postgresql://siddhant@localhost:5432/throwaway"
}
model User {
id Int @id
name String
// Comment
email String @unique
// Comment 2
}
Environment & setup
- OS: macOS
- Database: Postgres
- Prisma version:
@prisma/cli : 2.0.0-beta.5
Current platform : darwin
Query Engine : query-engine 0c2ec197653b278b2978845ef958db88824cd82e
Migration Engine : migration-engine-cli 0c2ec197653b278b2978845ef958db88824cd82e
Introspection Engine : introspection-core 0c2ec197653b278b2978845ef958db88824cd82e
Format Binary : prisma-fmt 0c2ec197653b278b2978845ef958db88824cd82e
- Node.js version: v12.16.3
Bug description
How to reproduce
prisma format/ save in the VSCode extension, the schema becomes:Expected behavior
The schema should be:
Environment & setup