Prisma schema processor
yarn prisma-schema --help
based on @smcelhinney's smcelhinney/prisma-merge-schema
- @attribute-override
- @attribute-remove
- @auto-delete
- @extend
- @inherits
- @import
- @abstract
- � TBD �
Following files
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
// previewFeatures = []
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model BaseModel { // @abstract
id String @id @default(cuid())
createdDateTime DateTime @default(now())
updatedDateTime DateTime @updatedAt
deletedDateTime DateTime @default("1970-01-01T00:00:00-00:00")
}
// @import './base.template.prisma'
enum Platform {
ANDROID
IOS
WEB
WINDOWS
}
model Application { // @inherits BaseModel
clientKey String
clientSecret String
platform Platform
}
model Application { // @extend
version String
}
model Application { // @extend
name String
}
model Application { // @attribute-override
clientSecret Int
}
model Application { // @attribute-remove
clientKey Int
}
// @import './header.template.prisma'
// @import './inherit.template.prisma'
// @import './extend.template.prisma'
// @import './attribute-override.template.prisma'
// @import './attribute-remove.template.prisma'
will produce
// This file was generated by @txo/prisma-schema (https://www.npmjs.com/package/@txo/prisma-schema)
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
// previewFeatures = []
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
enum Platform {
ANDROID
IOS
WEB
WINDOWS
}
model Application {
id String @id @default(cuid())
createdDateTime DateTime @default(now())
updatedDateTime DateTime @updatedAt
deletedDateTime DateTime @default("1970-01-01T00:00:00-00:00")
clientSecret Int
platform Platform
version String
name String
}