From 34cf68e4d6727369006d2518cffb89970b8231b1 Mon Sep 17 00:00:00 2001 From: SferaDev Date: Wed, 16 Oct 2024 12:03:59 +0000 Subject: [PATCH 1/2] Update pgroll spec --- packages/pgroll/src/schema.ts | 4 ++++ packages/pgroll/src/types.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/pgroll/src/schema.ts b/packages/pgroll/src/schema.ts index 6185553a6..75b0ad392 100644 --- a/packages/pgroll/src/schema.ts +++ b/packages/pgroll/src/schema.ts @@ -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'], diff --git a/packages/pgroll/src/types.ts b/packages/pgroll/src/types.ts index bd1dead84..797f0cd0c 100644 --- a/packages/pgroll/src/types.ts +++ b/packages/pgroll/src/types.ts @@ -64,7 +64,8 @@ export type OpCreateIndex = z.infer; 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; From b0581918423c3e1dc3e255831d5efb7a7fdb0f46 Mon Sep 17 00:00:00 2001 From: Alexis Rico Date: Wed, 16 Oct 2024 16:05:33 +0200 Subject: [PATCH 2/2] Create thick-kings-eat.md --- .changeset/thick-kings-eat.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/thick-kings-eat.md diff --git a/.changeset/thick-kings-eat.md b/.changeset/thick-kings-eat.md new file mode 100644 index 000000000..51942104b --- /dev/null +++ b/.changeset/thick-kings-eat.md @@ -0,0 +1,5 @@ +--- +"@xata.io/pgroll": patch +--- + +Update pgroll spec