Conventions & Standards
This page will provide details on configuration recommendations, as well as define some standards for how you should interact with Prisma Util for an adequate developer experience.
Paths & Denoting Paths
Whenever you define a Path object in your configuration file, you are presented with freedom of choice on how you want to represent that specific path. While that is good if you know what you're doing, we've provided some guidelines that will help you keep track of paths and consistency so you don't end up with configuration issues:
Paths that define a file in the same directory as the configuration file should not start with .
and should follow this example instead:
.
and should follow this example instead:❌ ./models/user/User.prisma
✅ models/user/User.prisma
You shouldn't use paths in upper directories, but follow a downwards hierarchy instead:
❌ ../models/user/User.prisma
✅ You should instead copy the file to your current folder, or move the working directory one level above. If moving the working directory isn't an alternative, you can follow the next advice and ignore this one, because this problem is fixed if you do so.
Always use constant values instead of defining your paths in 2 places:
Last updated