drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: postgres: deferrable constraints

Open
#1,429 24 comments 107 reactions 0 assignees View on GitHub
db/postgres drizzle/kit enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-PARMS-DEFERRABLE

I'm looking for something along the lines of:

```typescript
export const foo = pgTable("foo",
{
name: text("name").notNull(),
},
(foo) => ({
uniqueName: unique("name_unique", {deferrable: true, initially: "immediate"}).on(foo.name),
}),
) satisfies PgTable;
```

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.