:wave: Bonjour, Is there a way to provide a datab...
# orm-help
b
👋 Bonjour, Is there a way to provide a database connection configuration by providing separately the hostname, the port, the username, ... instead of all in one URL? Example:
Copy code
datasource db {
  provider = "mysql"
  host      = env("DATABASE_HOST")
  port      = env("DATABASE_PORT")
  ...
}
Instead of:
Copy code
datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
  ...
}
Thank you
✅ 1
n
Hey Benjamin 👋 Welcome to our slack community! Not exactly, but the variables stored in env files can be expanded using the format specified by dotenv-expand: Reference Also, you could programmatically override datasource URL: Example
b
thank you, I already tried to programmatically override datasource URL like the example, it works properly but the prisma commands didn't work anymore (prisma migrate, prisma generate, ...)
I also tried to split my URL in the .env file and to recombine them in another variable, still in my .env file, but in my organization we replace all environment variables from a vault so my combined variable too