Skip to content

Commit

Permalink
Update pgroll spec (#1618)
Browse files Browse the repository at this point in the history
Co-authored-by: SferaDev <SferaDev@users.noreply.github.com>
  • Loading branch information
xata-bot and SferaDev authored Nov 5, 2024
1 parent c270e5c commit b7f264b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/pgroll/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ export const schema = {
storage_parameters: {
description: 'Storage parameters for the index',
type: 'string'
},
unique: {
description: 'Indicates if the index is unique',
type: 'boolean'
}
},
required: ['columns', 'name', 'table'],
Expand Down
3 changes: 2 additions & 1 deletion packages/pgroll/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const OpCreateIndexDefinition = z.object({
table: z.string(),
predicate: z.string().optional(),
method: z.string().optional(),
storage_parameters: z.string().optional()
storage_parameters: z.string().optional(),
unique: z.boolean().optional()
});

export type OpCreateTable = z.infer<typeof OpCreateTableDefinition>;
Expand Down

0 comments on commit b7f264b

Please sign in to comment.