---
title: "Configuring Drizzle Kit"
description: "Configuring Drizzle Kit allows you to define how database commands—such as generating migrations, pushing schema updates, and running Drizzle Studio—interact with your database. By setting up a con..."
last_updated: "2026-10-12T08:15:22.007373+00:00"
canonical_url: "https://www.doc0.dev/docs/e1b68fed-3c4e-4c95-b2ba-ebf050f78025/guide/configuration/configuring-drizzle-kit"
---

## Overview

### Introduction to Configuration

Configuring Drizzle Kit allows you to define how database commands—such as generating migrations, pushing schema updates, and running Drizzle Studio—interact with your database. By setting up a configuration file, you can specify your database dialect, connection credentials, file paths, and advanced options in one centralized place.

---

### Creating a Configuration File

To get started, create a configuration file named in your project's root directory.

1. Create a file named `drizzle.config.ts` in your project root.
2. Define and export your configuration object using the required `dialect`, `schema`, and credential settings.

Here is a sample configuration file for a PostgreSQL database:

```typescript
import type { Config } from 'drizzle-kit';

export default {
  dialect: 'postgresql',
  schema: './src/schema.ts',
  out: './drizzle',
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
} satisfies Config;
```

> [!NOTE]
> Make sure you have installed the required database driver packages in your project before running commands with your configuration file.

---

### Configuration Options Reference

The configuration options available for your setup control how Drizzle Kit connects to and processes your database schema.

| Option | Type | Description |
| :--- | :--- | :--- |
| `dialect` | string | Mandatory database dialect. Supported dialects: `postgresql`, `mysql`, `sqlite`, `singlestore`, `gel`, `turso`. |
| `schema` | string \| string[] | Path or glob pattern to your database schema file or files. |
| `out` | string | Output folder for generated migration files and database snapshots. Defaults to `./drizzle`. |
| `driver` | string | Optional driver used when accessing specific services. Supported drivers: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`. |
| `dbCredentials` | object | Connection credentials required to connect to your database (such as connection strings or host details). |
| `breakpoints` | boolean | Enables or disables SQL statement breakpoints in generated migrations. True by default. |
| `verbose` | boolean | Prints all statements that will be executed during push commands. |
| `strict` | boolean | Always asks for confirmation before executing statements to sync your schema with the database. |
| `casing` | string | Controls column casing for serialization. Supported values: `camelCase`, `snake_case`. |
| `tablesFilter` | string \| string[] | Glob pattern or array of patterns to filter tables during push commands. |
| `schemaFilter` | string \| string[] | Defines which schema in PostgreSQL to use for introspection or push commands. |

---

### Database Credentials by Dialect

Depending on the chosen `dialect`, the `dbCredentials` object expects specific properties:

* **PostgreSQL:** Can use a connection URL (`url`) OR individual fields (`host`, `port`, `user`, `password`, `database`, `ssl`). Alternatively, when using the `aws-data-api` driver, it requires `database`, `secretArn`, and `resourceArn`.
* **MySQL:** Can use a connection URL (`url`) OR individual fields (`host`, `port`, `user`, `password`, `database`, `ssl`).
* **SQLite:** Requires a database file path or URL (`url`).
* **Turso / LibSQL:** Requires a database URL (`url`) and an optional authentication token (`authToken`).
* **SingleStore:** Can use a connection URL (`url`) OR individual fields (`host`, `port`, `user`, `password`, `database`).

> [!TIP]
> Use environment variables (via `process.env.DATABASE_URL`) inside your configuration file to keep sensitive credentials secure and out of version control.

## Related

- [Managing Migrations](https://www.doc0.dev/docs/e1b68fed-3c4e-4c95-b2ba-ebf050f78025/guide/how-to-guides/managing-migrations)
- [Connecting Databases](https://www.doc0.dev/docs/e1b68fed-3c4e-4c95-b2ba-ebf050f78025/guide/getting-started/connecting-databases)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/e1b68fed-3c4e-4c95-b2ba-ebf050f78025/llms.txt) for all pages in this wiki.
