Open justmenyou opened 3 months ago
I just tested it but seem like Prisma dose not support the env() function in the provider argument. Is there any other way to make it as env variable?
You cannot use an env() for the provider, only the location of the DB - in SQLite's case at least.
I think the only other way around this would be to have many different schemas that have different connectors, but the same schemas - which is the main reason this was never pressured because it makes things very messy in the codebase and if you use something other than SQLite, we dont use the DB to its fullest extent for performance - since SQLite is probably the most "bare bones" DB
What would you like to see?
Currently, the datasource configuration is hardcoded. This suggestion proposes making the datasource configurable via environment variables.
base on file "server/prisma/schema.prisma"
it should look like
I know there are example for postgresql in the comment but i think it wolud be better to let it be env by default and make default datasource env config as "sqlite" as it intends to be