From 1c41a488b2525646a4ea1c7744f2637c14c6a5bf Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Tue, 19 Sep 2023 09:15:13 +0300 Subject: [PATCH] Return when there is no migration found --- src/AbpDevTools/Commands/MigrateCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AbpDevTools/Commands/MigrateCommand.cs b/src/AbpDevTools/Commands/MigrateCommand.cs index 98bff69..48984c0 100644 --- a/src/AbpDevTools/Commands/MigrateCommand.cs +++ b/src/AbpDevTools/Commands/MigrateCommand.cs @@ -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;