-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore(sdk): split up engineCommands
tests
#7829
Conversation
Follows #7796 |
@williamluke4 Looks like it's failing since the other PR was merged? |
31ca0b9
to
7cb9a9a
Compare
0c95c7e
to
a5f192f
Compare
test('sqlite and createMany', async () => { | ||
expect.assertions(1) | ||
try { | ||
await getConfig({ | ||
datamodel: ` | ||
datasource db { | ||
provider = "sqlite" | ||
url = "file:../hello.db" | ||
} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
previewFeatures = ["createMany"] | ||
} | ||
|
||
model A { | ||
id Int @id | ||
name String | ||
}`, | ||
}) | ||
} catch (e) { | ||
expect(stripAnsi(e.message)).toMatchInlineSnapshot(` | ||
"Get config: Database provider \\"sqlite\\" and the preview feature \\"createMany\\" can't be used at the same time. | ||
Please either remove the \\"createMany\\" feature flag or use any other database type that Prisma supports: postgres, mysql or sqlserver." | ||
`) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related for info:
createMany is GA since 2.20.0 and doesn't need a preview flag anymore.
We probably can remove this error?
prisma/src/packages/sdk/src/engine-commands/getConfig.ts
Lines 54 to 62 in 5a4d80c
// TODO This has been outdated for ages and needs to be handled differently and/or removed | |
if ( | |
data.datasources?.[0]?.provider?.[0] === 'sqlite' && | |
data.generators.some((g) => g.previewFeatures.includes('createMany')) | |
) { | |
const message = `Database provider "sqlite" and the preview feature "createMany" can't be used at the same time. | |
Please either remove the "createMany" feature flag or use any other database type that Prisma supports: postgres, mysql or sqlserver.` | |
throw new GetConfigError(message) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @williamluke4! 👍
No description provided.