Skip to content
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

prisma init --datasource-provider=cockroachdb --url ... sets provider to postgresql #12360

Closed
Tracked by #12385
Jolg42 opened this issue Mar 15, 2022 · 1 comment · Fixed by #12835
Closed
Tracked by #12385

prisma init --datasource-provider=cockroachdb --url ... sets provider to postgresql #12360

Jolg42 opened this issue Mar 15, 2022 · 1 comment · Fixed by #12835
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. tech/typescript Issue for tech TypeScript. topic: cockroachdb topic: prisma init CLI: prisma init
Milestone

Comments

@Jolg42
Copy link
Member

Jolg42 commented Mar 15, 2022

Note: --datasource-provider is not read if --url is passed.

There is an edge case not handled here for cockroachdb urls which will be added with postgresql provider (since they start with postgresql://)

Using --datasource-provider=cockroachdb will work, but with an example url instead of what is supplied via --url.

We should probably open that up to allow setting it.

Maybe also document that --url leads to it trying to auto detect.

@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: prisma init CLI: prisma init team/schema Issue for team Schema. topic: cockroachdb labels Mar 15, 2022
@janpio janpio added the tech/typescript Issue for tech TypeScript. label Mar 24, 2022
@janpio janpio changed the title prisma init --url does not set the correct provider when the url is for cockroachdb prisma init --datasource-provider=cockroachd --url ... sets provider to postgresql Apr 11, 2022
@janpio janpio changed the title prisma init --datasource-provider=cockroachd --url ... sets provider to postgresql prisma init --datasource-provider=cockroachdb --url ... sets provider to postgresql Apr 11, 2022
@jkomyno jkomyno self-assigned this Apr 15, 2022
@Jolg42 Jolg42 added this to the 3.13.0 milestone Apr 19, 2022
@janpio
Copy link
Member

janpio commented Apr 20, 2022

Confirmed manually 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. tech/typescript Issue for tech TypeScript. topic: cockroachdb topic: prisma init CLI: prisma init
Projects
None yet
3 participants