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
config.datasources[0].provider
from GetConfig needs to be a string and not a string[]
#8467
Comments
config.datasources[0].provider
from GetConfig needs to be a string and not a string[]
We'll for now research places where this fix on |
Studio doesn't use |
Found these lines using it, we can easily fix them after the engine fix:
Tried the hacky patch on TS side and can confirm it works. |
Reopening, so @Jolg42 can close it if nothing breaks in the clients. |
Closing, small changes were made in #8556 which then made it through our dev pipeline in Thanks! 💚 |
Problem
This is the related commit that introduced the regression:
prisma/prisma-engines@b096a80
In this commit it looks like we removed the array from the datasource but added it to the serialization.
Rust Type found in https://github.com/prisma/prisma-engines/blob/master/libs/datamodel/core/src/configuration/datasource.rs#L12-L13
the tests also show it’s currently an array of strings with only one string https://github.com/prisma/prisma-engines/blob/master/libs/datamodel/core/tests/config/datasources.rs#L16
Suggestion
I think it should be a string and not an array returned here by the Rust code.
I could monkey patch in the CLI but it seems wrong because we have a datasource[] array and each datasource can only have one provider.
It looks like some legacy from the multi provider array feature deprecated a while ago.
Internal Slack Thread here
The text was updated successfully, but these errors were encountered: