From b1013064cc62ba91cce6ac7df5777c71d6f8a1b9 Mon Sep 17 00:00:00 2001 From: Xata Bot <97746683+xata-bot@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:39:42 +0100 Subject: [PATCH] [OpenAPI] Spec updates (#1525) Signed-off-by: Alexis Rico Co-authored-by: github-merge-queue[bot] Co-authored-by: Alexis Rico --- cli/src/commands/pull/pull.test.ts | 12 ++++++++---- cli/src/commands/push/push.test.ts | 9 ++++++--- packages/client/src/api/dataPlaneComponents.ts | 1 - packages/client/src/api/dataPlaneSchemas.ts | 4 ++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/cli/src/commands/pull/pull.test.ts b/cli/src/commands/pull/pull.test.ts index 290aee7e7..e0d5c294c 100644 --- a/cli/src/commands/pull/pull.test.ts +++ b/cli/src/commands/pull/pull.test.ts @@ -50,7 +50,8 @@ const pgrollMigration1: Schemas.MigrationHistoryItem = { migrationType: 'pgroll', name: 'mig_cmkjcdrj7c92neg7lnmg', parent: 'mig_cmkjccmg1th0of00f5n0', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const pgrollMigration2: Schemas.MigrationHistoryItem = { @@ -60,7 +61,8 @@ const pgrollMigration2: Schemas.MigrationHistoryItem = { migrationType: 'inferred', name: 'mig_abcdcdrj7c92neg7lefg', parent: 'mig_abcdcdrj7c92neg7lerr', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const pgrollMigration3: Schemas.MigrationHistoryItem = { done: true, @@ -69,7 +71,8 @@ const pgrollMigration3: Schemas.MigrationHistoryItem = { migrationType: 'pgroll', name: 'mig_abcdcdrj7c92neg7lefg', parent: 'mig_abcdcdrj7c92neg7lerr', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const pgrollMigration4: Schemas.MigrationHistoryItem = { done: true, @@ -78,7 +81,8 @@ const pgrollMigration4: Schemas.MigrationHistoryItem = { migrationType: 'pgroll', name: 'mig_xyzdcdrj7c92neg7lxyz', parent: 'mig_xyzdcdrj7c92neg7lxyz', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const baseFetch = (url: string, request: any) => { diff --git a/cli/src/commands/push/push.test.ts b/cli/src/commands/push/push.test.ts index 2a8f1f227..0504effbc 100644 --- a/cli/src/commands/push/push.test.ts +++ b/cli/src/commands/push/push.test.ts @@ -67,7 +67,8 @@ const pgrollMigration1: Schemas.MigrationHistoryItem = { migrationType: 'pgroll', name: 'mig_cmkjcdrj7c92neg7lnmg', parent: 'mig_cmkjccmg1th0of00f5n0', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const pgrollMigration2: Schemas.MigrationHistoryItem = { @@ -76,7 +77,8 @@ const pgrollMigration2: Schemas.MigrationHistoryItem = { migrationType: 'pgroll', name: 'mig_abcdcdrj7c92neg7lefg', parent: 'mig_cmkjccmg1th0of00f5n0', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const pgrollMigration3: Schemas.MigrationHistoryItem = { @@ -86,7 +88,8 @@ const pgrollMigration3: Schemas.MigrationHistoryItem = { migrationType: 'inferred', name: 'mig_xbcdcdrj7c92neg7lefx', parent: 'mig_cmkjccmg1th0of00f5n0', - startedAt: '2024-01-18T14:31:20.795975Z' + startedAt: '2024-01-18T14:31:20.795975Z', + schema: 'public' }; const baseFetch = (url: string, request: any) => { diff --git a/packages/client/src/api/dataPlaneComponents.ts b/packages/client/src/api/dataPlaneComponents.ts index 76d0666c2..a2a4b54ab 100644 --- a/packages/client/src/api/dataPlaneComponents.ts +++ b/packages/client/src/api/dataPlaneComponents.ts @@ -372,7 +372,6 @@ export type StartMigrationRequestBody = { operations: { [key: string]: any; }[]; - adaptTables?: boolean; }; export type StartMigrationVariables = { diff --git a/packages/client/src/api/dataPlaneSchemas.ts b/packages/client/src/api/dataPlaneSchemas.ts index 90b0612e9..5a561d852 100644 --- a/packages/client/src/api/dataPlaneSchemas.ts +++ b/packages/client/src/api/dataPlaneSchemas.ts @@ -355,6 +355,10 @@ export type MigrationHistoryItem = { * The name of the migration */ name: string; + /** + * The schema in which the migration was applied + */ + schema: string; /** * The pgroll migration that was applied */