Skip to content

Commit

Permalink
Return when there is no migration found
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Sep 19, 2023
1 parent dc6e22a commit 1c41a48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AbpDevTools/Commands/MigrateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public async ValueTask ExecuteAsync(IConsole console)

var cancellationToken = console.RegisterCancellationHandler();

if (dbMigrators.Count == 0)
{
await console.Output.WriteLineAsync($"No migrator(s) found in this folder. Migration not applied.");
return;
}

await console.Output.WriteLineAsync($"{dbMigrators.Count} db migrator(s) found.");

var commandPostFix = NoBuild ? " --no-build" : string.Empty;
Expand Down

0 comments on commit 1c41a48

Please sign in to comment.