Parameter for prisma init
to supply connection string to be used in datasource
#2577
Labels
kind/improvement
An improvement to existing feature and code.
tech/typescript
Issue for tech TypeScript.
topic: dx
topic: prisma init
CLI: prisma init
Milestone
Problem
Right now we need to tell people to use
prisma init
and then open and editprisma/.env
to add their connection string: https://twitter.com/nikolasburk/status/1265617985986801664This is cumbersome, especially if you just want people to get to a working Introspection as quickly as possible.
Suggested solution
We could add a param
--database
(or--connection-string
or--url
or similar) that takes and validates the connection string, extracts the provider (mysql://
=>mysql
etc) and persists both in the newly generatedschema.prisma
and.env
automatically.Alternatives
We keep the manual workflow that tells people to edit the file.
The text was updated successfully, but these errors were encountered: