language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Prisma VSCode extension combines multiple copies of the same schema and throws errors

Open Arlen22 opened this issue 2 months ago • 2 comments

The Prisma VS Code extension treats multiple copies of the same schema as though they are supposed to be separate files in a multi-file schema, and then complains that everything has duplicate names. This is especially annoying when I use a custom output directory that is within the detected source code of my project as it will often automatically detect the schema without me even opening it, and then I have red folders which I open to check the problem, only to realize it's just the schema being detected.

Arlen22 avatar Oct 31 '25 17:10 Arlen22

Hey 👋

Could you provide a minimal repository that reproduces what you're experiencing?

igalklebanov avatar Nov 04 '25 22:11 igalklebanov

put the following schema in a parent and child folder (so the second schema's folder is sibling to the first folder)


datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

enum BranchUserLevel {
  user
  admin
}

If that doesn't cause it to happen, try adding the generator block to one of them so they aren't byte identical.

Arlen22 avatar Nov 05 '25 14:11 Arlen22