Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions content/docs/guides/drizzle.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ The connection string includes the user name, password, hostname, and database n
Create a `.env` file in your project's root directory and add the connection string to it. Your `.env` file should look like this:

```text shouldWrap
DATABASE_URL="postgresql://[user]:[password]@[neon_hostname]/[dbname]?sslmode=require&channel_binding=require"
# Pooled connection for your application
DATABASE_URL="postgresql://[user]:[password]@[endpoint]-pooler.[region].aws.neon.tech/[dbname]?sslmode=require"
Comment on lines 68 to +72

# Unpooled connection for Drizzle Kit
DIRECT_URL="postgresql://[user]:[password]@[endpoint].[region].aws.neon.tech/[dbname]?sslmode=require"
```

## Install Drizzle and a driver
Expand Down Expand Up @@ -140,7 +144,7 @@ export default defineConfig({
out: './drizzle', // Your migrations folder
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL,
url: process.env.DIRECT_URL,
},
Comment on lines 146 to 148
});
```
Expand Down