diff --git a/packages/pgroll/src/schema.ts b/packages/pgroll/src/schema.ts index 75b0ad392..a374edbdc 100644 --- a/packages/pgroll/src/schema.ts +++ b/packages/pgroll/src/schema.ts @@ -263,6 +263,15 @@ export const schema = { predicate: { description: 'Conditional expression for defining a partial index', type: 'string' + }, + method: { + description: 'Index method to use for the index: btree, hash, gist, spgist, gin, brin', + type: 'string', + enum: ['btree', 'hash', 'gist', 'spgist', 'gin', 'brin'] + }, + storage_parameters: { + description: 'Storage parameters for the index', + type: 'string' } }, required: ['columns', 'name', 'table'], diff --git a/packages/pgroll/src/types.ts b/packages/pgroll/src/types.ts index 797f0cd0c..0abadbf84 100644 --- a/packages/pgroll/src/types.ts +++ b/packages/pgroll/src/types.ts @@ -65,7 +65,9 @@ export const OpCreateIndexDefinition = z.object({ columns: z.array(z.string()), name: z.string(), table: z.string(), - predicate: z.string().optional() + predicate: z.string().optional(), + method: z.string().optional(), + storage_parameters: z.string().optional() }); export type OpCreateTable = z.infer;