10000 GitHub - iolathief108/prisma-merge: Merge prisma schema files
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

iolathief108/prisma-merge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prisma-merge

oclif Version Downloads/week License

Until prisma supports multiple schema definition files. See issue #2377

We define our base-file which usually contains your datasource and generator statement and define a glob pattern for our schema files (usually just *.prisma). It will then output a merged version.

We make use of the fact, that all generated schema files in migrations or the generated client are named schema.prisma. So as long as we name our schema files something else and include schema.prisma in our excluded pattern (which is the default), we should be fine. You can also just copy the script and tailor it to your needs. The base & output file are excluded anyways and dont need to be added to the excludedFilePatterns

Install

With yarn

$ yarn add --dev prisma-merge

or npx

$ npx prisma-merge

Options

 -b, --baseFile                    [default: src/prisma/base.prisma] Base file usually with datasource & generator statement
 -s, --schemaFilePatterns          [default: src/**/*.prisma] Glob to all prisma files to include
 -o, --outputFile                  [default: src/prisma/schema.prisma] Output file
 -e, --excludedFilePattern         [default: src/**/schema.prisma] Glob pattern for excluded files (e.g schema.prisma in migrations / generated folder)
 -h, --help                        show CLI help
4B74

About

Merge prisma schema files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.2%
  • JavaScript 11.6%
  • Batchfile 1.2%
0