prisma-client-go
prisma-client-go copied to clipboard
set datasource url programmatically
Hello,
I have my own config file and I want to set datasource url programmatically in prisma file. How can I do this?
It's not possible right now. I have already raised this internally.
In the meanwhile, you can declare an environment variable in the schema file and provide that directly or use os.Setenv
:
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
You can now override the data source URL, see #1060