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
16 changes: 16 additions & 0 deletions src/content/docs/drizzle-config-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,22 @@ export default defineConfig({
<rem025/>
<SchemaFilePaths />

### `casing`
<rem025/>
`casing` is responsible for in-code column keys casing for migration commands.
| | |
| :------------ | :----------------- |
| type | `'camelCase' \| 'snake_case'` |
| default | -- |
| commands | `migrate` `push` `pull` `generate` |
<rem025/>
```ts {4}
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "postgresql",
casing: "snake_case",
});
```

### `out`
<rem025/>
Expand Down
5 changes: 5 additions & 0 deletions src/content/docs/sql-schema-declaration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ SELECT "id", "first_name" from users;
```
</Section>

**Note:** The `casing` option configured in the Drizzle ORM instance only affects runtime query mapping.
It does not apply to `drizzle-kit` (migrations, schema generation, etc.), which uses its own configuration in `drizzle.config.ts`.

See the [`casing`](/docs/drizzle-config-file#casing) option in the drizzle config reference for more information.

### Advanced

There are a few tricks you can use with Drizzle ORM. As long as Drizzle is entirely in TypeScript files,
Expand Down