Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/content/docs/get-started/pglite-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import SetupEnv from '@mdx/get-started/SetupEnv.mdx';

#### Step 5 - Setup Drizzle config file

<SetupConfig dialect='postgresql' env_variable='DATABASE_URL'/>
<SetupConfig dialect='postgresql' env_variable='DATABASE_URL' driver='pglite'/>

#### Step 6 - Applying changes to the database

Expand All @@ -59,4 +59,4 @@ import SetupEnv from '@mdx/get-started/SetupEnv.mdx';

#### Step 8 - Run index.ts file

<RunFile/>
<RunFile/>
6 changes: 3 additions & 3 deletions src/mdx/get-started/SetupConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import CodeWithProps from "@mdx/CodeWithProps.astro";

Create a `drizzle.config.ts` file in the root of your project and add the following content:

<CodeWithProps dialect={props.dialect} env_variable={props.env_variable}>
<CodeWithProps dialect={props.dialect} env_variable={props.env_variable} driverLine={props.driver ? `\n driver: '${props.driver}',\n` : ''}>
```typescript copy filename="drizzle.config.ts"
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
out: './drizzle',
schema: './src/db/schema.ts',
dialect: '$dialect$',
dialect: '$dialect$',$driverLine$
dbCredentials: {
url: process.env.$env_variable$!,
},
});
```
</CodeWithProps>
</CodeWithProps>