Skip to content

Commit

Permalink
Update pgroll spec (#1616)
Browse files Browse the repository at this point in the history
Co-authored-by: SferaDev <[email protected]>
  • Loading branch information
xata-bot and SferaDev authored Oct 29, 2024
1 parent 7f669b3 commit 890a8c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/pgroll/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 3 additions & 1 deletion packages/pgroll/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof OpCreateTableDefinition>;
Expand Down

0 comments on commit 890a8c0

Please sign in to comment.