Deferrable on unique indexes and constraints
Hi everyone,
I am trying to figure out how to add deferrable to indexes and constraints in psql dialect. I've found some issues (such as issue 224) however not found any related to what I need:
I have not found any related builders neither in
.addIndex
nor .addUniqueConstraint
.GitHub
Issues ยท kysely-org/kysely
A type-safe TypeScript SQL query builder. Contribute to kysely-org/kysely development by creating an account on GitHub.
7 Replies
Deferrable constraints can be added like this
https://kyse.link/gR5ME
AFAIK postgres indexes can't be deferred. Please point me to the docs that say otherwise if they can
thanks! you are right. I misused the question. deferrable constraint was what I was looking for. partial indexes (using where) are also supported?
yeah, it is ๐ that's why I created a "helper" to make all these things easier ๐

Ugh, how is that better ๐
not this particular case ๐ however the helper is really very very very useful in migrations. it keeps all things type-safe and add missing-yet features in kysely
Few screenshots to give you some idea what the helper is all about. It's a framework on top of a framework ๐



