drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: postgres: deferrable constraints
Open
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
Assessment
This issue has not been assessed yet.