Split the prisma cli in multiple packages
See original GitHub issueProblem
A lot of my clients are running prisma migrations at runtime when the service boots. While I don’t recommend this approach, this is what they do. This leads to an annoying problem where they either include all dev dependencies in their production Docker image or they add the full prisma cli in the production dependencies. This bloats the image unnecessarily.
Suggested solution
It would be nice if we could just add a smaller @prisma/migrate
package in the production dependencies that would only contain the commands necessary to perform the migrations.
Alternatives
Continue doing what they are doing or have another step in the CICD to do the migration (should be preferred but hard to make happen sometimes)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Prisma CLI Command Reference
This page gives an overview of all available Prisma CLI commands, explains their options and shows numerous usage examples.
Read more >Generating the client (Concepts) - Prisma
This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.
Read more >Prisma schema (Reference)
Whenever a prisma command is invoked, the CLI typically reads some ... A generator (Prisma Client); A data model definition with two models...
Read more >Relation queries (Concepts) - Prisma
A key feature of Prisma Client is the ability to query relations between two or more models. Relation queries include: Nested reads (sometimes...
Read more >Prisma CLI Installation (Reference)
The Prisma CLI is available as an npm package. ... Warning: If you have several Prisma projects on your machine, a global installation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Depends on the company:
Ok - I think my issue is highly related to this improvement (the goal is the same - to have a small amount of code specific to migrations) and I think the download code is technically behaving as designed - but I’ll open a new one that is more specific.
(filed as #11234 )