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]);