Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): add deprecation message for introspect command #8763

Merged
merged 16 commits into from Aug 18, 2021
Merged
@@ -0,0 +1,34 @@
generator min {
// https://github.com/timsuchanek/minimal-generator
provider = "npx @timsuchanek/minimal-generator"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It runs the command, it's what powers the go client like https://github.com/prisma/prisma-client-go/blob/master/docs/quickstart.md

generator db {
    provider = "go run github.com/prisma/prisma-client-go"
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source code should be here

if (this.isNode) {
this.child = fork(this.executablePath, [], {
stdio: ['pipe', 'inherit', 'pipe', 'ipc'],
env: {
...process.env,
PRISMA_GENERATOR_INVOCATION: 'true',
},
execArgv: ['--max-old-space-size=8096'],
})
} else {
this.child = spawn(this.executablePath, {
stdio: ['pipe', 'inherit', 'pipe'],
env: {
...process.env,
PRISMA_GENERATOR_INVOCATION: 'true',
},
shell: true,
})
}

}

datasource db {
provider = "sqlite"
url = env("ENV_VAR_DOES_NOT_EXIST")
}

model Post {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}

model Profile {
id Int @id @default(autoincrement())
bio String?
user User @relation(fields: [userId], references: [id])
userId Int @unique
}

model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
profile Profile?
}