Skip to content

Commit

Permalink
Update pgroll spec
Browse files Browse the repository at this point in the history
  • Loading branch information
SferaDev authored and xata-bot committed Oct 16, 2024
1 parent 699821c commit 34cf68e
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 @@ -259,6 +259,10 @@ export const schema = {
table: {
description: 'Name of table on which to define the index',
type: 'string'
},
predicate: {
description: 'Conditional expression for defining a partial index',
type: 'string'
}
},
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 @@ -64,7 +64,8 @@ export type OpCreateIndex = z.infer<typeof OpCreateIndexDefinition>;
export const OpCreateIndexDefinition = z.object({
columns: z.array(z.string()),
name: z.string(),
table: z.string()
table: z.string(),
predicate: z.string().optional()
});

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

0 comments on commit 34cf68e

Please sign in to comment.