drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: function `$onInsert`

Open
#2,870 0 comments 3 reactions 0 assignees View on GitHub
enhancement qb/crud
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

Just as a suggestion. It may help to make the data more unified, for example:
```ts
export const roles = pgTable('roles', {
id: ...
name: text('name').notNull().unique().$onInsert((date) => {date.name = date.name.toUpperCase()),
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.