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

make superior: model generate #1651

Closed
ChenHaoJie9527 opened this issue Jan 25, 2024 · 1 comment · Fixed by #1710
Closed

make superior: model generate #1651

ChenHaoJie9527 opened this issue Jan 25, 2024 · 1 comment · Fixed by #1710
Assignees
Milestone

Comments

@ChenHaoJie9527
Copy link

Problem

I'm using prisma when defining model maps, and when I'm done writing all the code for execution, I always need to type in the npx prisma generate command, which can feel like a cumbersome not go.
example:

model Board {
  id    String @id @default(uuid())
  title String
}
model User {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  email     String   @unique
  name      String?
  role      Role     @default(USER)
}
enum Role {
  USER
  ADMIN
}

endpoint: npx prisma generate

Suggested solution

I would like to be able to omit the npx prisma generate step in the.

Alternatives

I have a good idea, I would like to change to interactive model generation, similar to Jest, Vitest in each unit test has a Run arrow button, when clicking on the arrow, it will generate the corresponding generate for me.
run

Additional context

Of course I'm crazy about my ideas and want to realize my ideas.

@Druue Druue transferred this issue from prisma/prisma Jan 29, 2024
@Druue Druue added kind/feature A request for a new feature. topic: automation team/schema Issue for team Schema. topic: visualisation labels Jan 29, 2024
@Druue
Copy link
Contributor

Druue commented Feb 16, 2024

Hey @ChenHaoJie9527 We don't currently support prisma generate on individual models, but I could definitely see this making sense as a clickable lens over a generator block :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants