Skip to content

Commit b0e6d9c

Browse files
committed
Fix issue with Prisma not supporting env in provider
1 parent c0afcbc commit b0e6d9c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.env.example

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ PORT=3000
22
SALT="this is a very insecure salt, change it"
33

44
DB_NAME=mydb
5-
DB_PROVIDER=postgres
65
DB_HOST=db # db refers to the name of the service in docker-compose.yml
76
DB_USER=johndoe
87
DB_PASSWORD=randompassword

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ See [cli/README.md](cli/README.md) for detailed instructions and library usage.
4949

5050
**Requirements:** Node.js (tested on 18+, should work with 14+), and a SQL database (tested on PostgreSQL, should work with MySQL and SQLite).
5151

52-
Right now, my instance is using PostgreSQL on Vercel. However, it can be run using any SQL DB such as SQLite or MySQL. To use other backends, please update the provider in [schema.prisma](src/lib/server/prisma/schema.prisma)
52+
Right now, my instance is using PostgreSQL on Vercel.
5353

5454
### .env Configuration
5555

56+
By default, it is configured to use PostgreSQL. However, it can be run using any SQL DB such as SQLite or MySQL. To use other backends, please update the provider in [schema.prisma](src/lib/server/prisma/schema.prisma).
57+
5658
- `DB_NAME` is the database name;
57-
- `DB_PROVIDER` uses 'postgres' by default, but can be changed to MySQL or SQLite.
5859
- `DB_HOST` database host (defaults to 'db', but can be changed to aything like localhost)
5960
- `DB_USER` database user
6061
- `DB_PORT` database port 5432

src/lib/server/prisma/schema.prisma

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ generator client {
66
}
77

88
datasource db {
9-
provider = env("DB_PROVIDER")
9+
provider = "postgresql"
1010
url = env("DATABASE_URL")
1111
}
1212

0 commit comments

Comments
 (0)