Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pgroll spec #1616

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading