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

prisma init --with-model #20915

Closed
janpio opened this issue Aug 31, 2023 · 4 comments · Fixed by #21195
Closed

prisma init --with-model #20915

janpio opened this issue Aug 31, 2023 · 4 comments · Fixed by #21195
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. good first issue Always wanted to get involved in an open source project but don’t know where to begin? Welcome! kind/feature A request for a new feature. topic: cli topic: prisma init CLI: prisma init
Milestone

Comments

@janpio
Copy link
Contributor

janpio commented Aug 31, 2023

When testing things, it is often needed that after prisma init you add a trivial model to your schema.prisma file. It would be amazing if there was a simple CLI argument that adds a model to the generated file by default, making that step obsolete.

Model can be as simple as our suggestion on prisma generate without a model:

model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
}
@janpio janpio added kind/feature A request for a new feature. topic: prisma init CLI: prisma init topic: cli good first issue Always wanted to get involved in an open source project but don’t know where to begin? Welcome! domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. labels Aug 31, 2023
@fool1280
Copy link

fool1280 commented Sep 2, 2023

Hi @janpio, I'd love to take on this issue.

@Kayoshi-dev
Copy link
Contributor

Hello guys, @fool1280 did you start working on this issue ? If not, can I do the PR ? I worked on it !

Thanks!

@Pankaj-SinghR
Copy link

Hey @Kayoshi-dev , I saw you have raised the PR for this issue, which having merge conflicts, can you plz resolve those, or let me know if i can take over this issue and raise a PR. 👍

@nikolasburk
Copy link
Member

Opened a PR to make the required docs changes for this: prisma/docs#5951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. good first issue Always wanted to get involved in an open source project but don’t know where to begin? Welcome! kind/feature A request for a new feature. topic: cli topic: prisma init CLI: prisma init
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants