From 1b71aa10cc55de7b45d086859ca516e1d7039f49 Mon Sep 17 00:00:00 2001 From: Richard Gill Date: Thu, 8 Feb 2024 07:34:41 +0000 Subject: [PATCH 1/2] CLI: xata pull always runs codegen --- cli/src/commands/pull/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cli/src/commands/pull/index.ts b/cli/src/commands/pull/index.ts index 92db1271c..db6994210 100644 --- a/cli/src/commands/pull/index.ts +++ b/cli/src/commands/pull/index.ts @@ -94,13 +94,12 @@ export default class Pull extends BaseCommand { const newMigrations = this.getNewMigrations(localMigrationFiles, commitToMigrationFile(logs)); await writeLocalMigrationFiles(newMigrations); - if (newMigrations.length === 0) { + if (newMigrations.length > 0) { + this.log(`Successfully pulled ${newMigrations.length} migrations from ${branch} branch`); + } else { this.log(`No new migrations to pull from ${branch} branch`); - return; } - this.log(`Successfully pulled ${newMigrations.length} migrations from ${branch} branch`); - if (this.projectConfig?.codegen && !flags['skip-code-generation']) { this.log(`Running codegen...`); await Codegen.run(['--branch', branch]); From 2049a58ebf54beeb2a93054ab8f5490aed4860ea Mon Sep 17 00:00:00 2001 From: Richard Gill Date: Thu, 8 Feb 2024 08:49:31 +0000 Subject: [PATCH 2/2] empty