-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Set default values for schema url
fields
#222
Comments
It is worth mentioning that we are currently using const photon = new Photon({
datasources: {
db: {
url: process.env.POSTGRES_URL || "postgresql://dev@localhost/testdb",
},
},
}); But using this approach Lift will still use the value in |
A note: This might also be solved by adding a second param default (of fallback) to the |
Hi @HosseinAgha! For 1., we're definitely going to add a default env argument, it'll likely look like this
For 2., thanks for bringing this up! We've created a new issue for this discussion. |
Was the default for the connection url functionality ever added? |
@blevine No, we didn't get any more requests for this so this was never pushed again up the priority classification. |
That's too bad. It seems to have been almost completely implemented and would have been a good enhancement. |
I guess this is still not implemented? I have a good use case for this feature at the moment as well. |
I would be happy to see an implementation of this as well! :-) |
Would love to see this implemented. It would help with zero downtime migrations of database credentials. Supporting something similar to |
url
fields
How would that work @2pmflow, specifically? If it falls back to the second value if the first env var is empty, can you not also just update the only single environment variable to the new value instead? |
My proposals
schema.prisma.js
)Why I think creating a new schema language isn't a good idea?
schema.prisma.js
option.What are the use cases for these?
I’m struggling to add Prisma 2 to my development workflow.
I have a complex NodeJS server that connects to some DBs and outside services. We try our best to keep initial configuration for new developers as simple as possible (setup everything in the first
npm run dev
).We use docker to initialize and run the DBs and external services and setup some default credentials for dev databases.
In the dev server we set the same default credentials for our DB connectors so new developers don’t have to worry about DB config at all.
The current
url
system for Prima Schema Language only accepts environment variables. It is a good thing for production but not the dev env.Using
.env
file is not a good option for us as each new developer should create it and add the default configs to it.The text was updated successfully, but these errors were encountered: