Prisma Migrate: programmatic access to CLI commands (`deploy`, `reset`...)
## Problem It would be nice to have a way to run the migrate programmatically. I am running into an issue where my api is using lambdas (serverless) and my database is only accessible from within an aws vpc. Because of this I cannot "execute commands" on deploy in an easy way. My current solution is to ssh into an ec2 that is within the vpc, execute the prisma commands, and then spin the ec2 back down. While this is working, it is far from ideal. If I was instead able to have a separate lambda that had all the migration data bundled with it I could execute the migration from a lambda (that is within the vpc). While this may seem like a specialized use case, databases that are not publicly accessible are common place, and solutions for migration that don't include running npm commands from the cli I think become critical. ## Solution ``` import {migrate} from '@prisma/cli'; migrate('up'); ``` ## Alternatives Stated above, no great alternatives for common usecases.
Posted by dested on May 5, 2020, 11:41 PM
Tags
Related issues
- The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
- I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
- I hate that I'm in deep enough to know what you mean.
- The biggest problem with “AI” is that big corps are shoving it down our throats.
- in the middel of a coding session with 5.6 sol.
- [Hero Run] 535B-A23B on 18T tokens
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
reliability (Other)
The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
I hate that I'm in deep enough to know what you mean.
The biggest problem with “AI” is that big corps are shoving it down our throats.
in the middel of a coding session with 5.6 sol.
[Hero Run] 535B-A23B on 18T tokens
I hate that this is how AI is being used..
inexperienced protobuf user here -- why do non-googlers generally use protobuf?
Prisma Migrate: programmatic access to CLI commands (`deploy`, `reset`...)
## Problem It would be nice to have a way to run the migrate programmatically. I am running into an issue where my api is using lambdas (serverless) and my database is only accessible from within an aws vpc. Because of this I cannot "execute commands" on deploy in an easy way. My current solution is to ssh into an ec2 that is within the vpc, execute the prisma commands, and then spin the ec2 back down. While this is working, it is far from ideal. If I was instead able to have a separate lambda that had all the migration data bundled with it I could execute the migration from a lambda (that is within the vpc). While this may seem like a specialized use case, databases that are not publicly accessible are common place, and solutions for migration that don't include running npm commands from the cli I think become critical. ## Solution ``` import {migrate} from '@prisma/cli'; migrate('up'); ``` ## Alternatives Stated above, no great alternatives for common usecases.
Comments (0)
No comments yet. Start the discussion.