[DOCS]: Remove calling `dotenv` in `drizzle.config.ts`
docs
### Enhancement hasn't been filed before.
- [x] I have verified this enhancement I'm about to request hasn't been suggested before.
### Describe the enhancement you want to request
> Environment variables are now fetched automatically
>
> As mentioned many times, you can finally skip fetching environment variables to use with the drizzle.config file. Drizzle Kit will handle this process automatically.
https://github.com/drizzle-team/drizzle-kit-mirror/releases/tag/v0.20.0
```ts
// drizzle.config.ts
import { config } from 'dotenv';
import { defineConfig } from 'drizzle-kit';
config({ path: '.env' }); // this seems unnecessary
export default defineConfig({
schema: './src/db/schema.ts',
out: './migrations',
dialect: 'turso',
dbCredentials: {
url: process.env.TURSO_CONNECTION_URL!,
authToken: process.env.TURSO_AUTH_TOKEN!,
},
});
```
```diff
- config({ path: '.env' });
```
https://orm.drizzle.team/docs/tutorials/drizzle-with-turso#setup-drizzle-config-file
0 条评论