knex-schema-inspector
knex-schema-inspector copied to clipboard
Add support for listing unique constraints
Hello there! I find working with unique constraints across multiple columns in knex
pretty cumbersome due to inability to delete all of them them/check if they exist before redefining them. This leads to the need to remember what constraints have been defined before. This is why I propose adding uniqueConstraints
method that will list all unique constraints. I'm more than willing to implement this feature for some dialects(oracledb
is not working on my machine).
Figured out how to make oracledb
work. Now I probably can implement it for every dialect.
I managed to implement this method for every dialect. If you decide to not include this feature in knex-schema-inspector
full implementation will still be on my fork.
Maybe this could be proposed to @directus/schema
package ? (fork maintained by directus team)
see https://github.com/directus/directus/tree/main/packages/schema