Repository navigation
How to run prisma migrate from code or without .env?
#19672
Replies: 3 comments
|
Hi @ivan-shaban 👋 Thank you for raising this question. It is currently not possible to run Prisma Migrate commands by code but we have two open feature requests for this:
It would be great if you could leave a 👍 and a comment with your exact use case to help us prioritize this! There are some workarounds suggested in the open issues that you can take a look at to see if it helps with your use case.
If this answers your question, it would be great if you could mark this Discussion as answered to indicate that it has been resolved. Otherwise please let us know how else we can help you further or close the Discussion if it was resolved in some other way 🙏 |
Environment variables are an actual thing - variables in the environment of a program. The solution you describe is actually "just" configuration via some file that is then loaded into a program. Does it actually also load them into Assuming you want to use Prisma CLI in your CI, you will need to find a way to transport the values from your solution to the real environment (or a temporary |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that haven’t had any recent activity and appear to be outdated. If this discussion is still important to you or unresolved, we’d love to hear from you! Feel free to reopen it or start a new one with updated details. For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and being part of the community! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, i want to work with different environments and has next flow:
So my question is - how properly run migrations and other db managements operations via cli at CI layer, when my env variables not stored into
.envfiles (i use https://github.com/node-config/node-config lib for example), how to pass \ convert that prisma's cli could understand them?I have access to all env variables values in my code at runtime, but i don't get how run them with cli, i understand that my concrete solution may be unique, but whole flow i as understand a kind of regular.
Thank you!
All reactions