Warn about provider array deprecation upon `prisma generate`
thebiglabasky opened this issue · comments
To reflect what was announced in prisma/prisma#3834 we need to show a warning to users calling prisma generate
whenever their schema is using a provider array, like provider = ["sqlite", "postgres"]
or similar.
The warning could link to the issue prisma/prisma#3834 to provide more context.
Suggested copy:
Warning: your schema is using the multiple datasource providers feature, which is now deprecated. We encourage you to use a single provider as this won't be supported in an upcoming release. You can read more about that in this issue: prisma/prisma#3834
I looked into it and in order to do this properly, we need to implement it in the engines, as we can't detect the array from TypeScript.
I suggest adding the warning to the getConfig
method, as it also returns the datasources.
Engine will be merged with prisma/prisma#4091 needs TS side after that
This warning is implemented in 2.11.0