I assume its configuration of your project.
To disable sql print try this
var builder = new DbContextOptionsBuilder<NAMEContext>();
builder.UseMySql(connectionString);
builder.UseLoggerFactory(new MigrationLoggerFactory()); <--- this seems to be what you are looking for
return new MigrationDataContext(builder.Options);
MigrationLoggerFactory
public class MigrationLoggerFactory : ILoggerFactory
{
public void Dispose() { }
public ILogger CreateLogger(string categoryName)
{
if ("Microsoft.EntityFrameworkCore.Migrations".Equals(categoryName))
return new MigrationLogger();
return new NullLogger();
}
public void AddProvider(ILoggerProvider provider)
{
}
}
NullLogger
public class NullLogger : ILogger
{
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
throw new NotImplementedException();
}
public bool IsEnabled(LogLevel logLevel)
{
return false;
}
public IDisposable BeginScope<TState>(TState state)
{
return null;
}
}
Here is an article which could also be helpful