Skip to content

[DOCS]: Remove calling dotenv in drizzle.config.ts #5725

Description

@hyunbinseo

Enhancement hasn't been filed before.

  • 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

// 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!,
  },
});
- config({ path: '.env' });

https://orm.drizzle.team/docs/tutorials/drizzle-with-turso#setup-drizzle-config-file

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions