From f6f6be2b938285960c15676c95841c782d457f7f Mon Sep 17 00:00:00 2001 From: Olivier Cavadenti Date: Tue, 2 Nov 2021 14:19:21 +0100 Subject: [PATCH] Allow string indexType in index creation (#4791) (cherry picked from commit f200e668c7bedbbf20ad75366276d5127de0b2de) --- types/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/index.d.ts b/types/index.d.ts index a726ed3fcf..5ffe7e0727 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2045,6 +2045,11 @@ export declare namespace Knex { primary(columnNames: readonly string[], options?: Readonly<{constraintName?: string, deferrable?: deferrableType}>): TableBuilder; /** @deprecated */ primary(columnNames: readonly string[], constraintName?: string): TableBuilder; + index( + columnNames: string | readonly (string | Raw)[], + indexName?: string, + indexType?: string + ): TableBuilder; index( columnNames: string | readonly (string | Raw)[], indexName?: string, @@ -2131,6 +2136,7 @@ export declare namespace Knex { indexName?: string, options?: Readonly<{indexType?: string, predicate?: QueryBuilder}> ): ColumnBuilder; + index(indexName?: string, indexType?: string): ColumnBuilder; } interface SqlLiteColumnBuilder extends ColumnBuilder {