diff --git a/Packages.props b/Packages.props
index a144a0f1..01eaa148 100644
--- a/Packages.props
+++ b/Packages.props
@@ -24,7 +24,7 @@
-
+
diff --git a/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210714.5.nupkg b/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210714.5.nupkg
deleted file mode 100644
index 0dcbc361..00000000
Binary files a/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210714.5.nupkg and /dev/null differ
diff --git a/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210902.7.nupkg b/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210902.7.nupkg
new file mode 100644
index 00000000..375d6349
Binary files /dev/null and b/bin/nuget/microsoft.sqlserver.migration.assessment.1.0.20210902.7.nupkg differ
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Migration/Contracts/MigrationAssessmentInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/Migration/Contracts/MigrationAssessmentInfo.cs
index 33d8fbbe..4900af73 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Migration/Contracts/MigrationAssessmentInfo.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Migration/Contracts/MigrationAssessmentInfo.cs
@@ -27,16 +27,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Migration.Contracts
///
public string RuleId { get; set; }
- ///
- /// Gets or sets assessed target's type.
- /// Supported values: 1 - server, 2 - database.
- ///
- public SqlObjectType TargetType { get; set; }
-
///
/// Gets or sets the assessed object's name.
///
- public string TargetName { get; set; }
+ public string TargetType { get; set; }
///
/// Gets or sets the database name.
@@ -89,5 +83,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Migration.Contracts
public string IssueCategory { get; set; }
public ImpactedObjectInfo[] ImpactedObjects { get; set; }
+
+ ///
+ /// This flag is set if the assessment result is a blocker for migration to Target Platform.
+ ///
+ public bool DatabaseRestoreFails { get; set; }
}
}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Migration/MigrationService.cs b/src/Microsoft.SqlTools.ServiceLayer/Migration/MigrationService.cs
index e9bfdb08..a2f51a38 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Migration/MigrationService.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Migration/MigrationService.cs
@@ -174,10 +174,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Migration
internal async Task GetAssessmentItems(string[] connectionStrings)
{
SqlAssessmentConfiguration.EnableLocalLogging = true;
- SqlAssessmentConfiguration.EnableReportCreation = true;
SqlAssessmentConfiguration.AssessmentReportAndLogsRootFolderPath = Path.GetDirectoryName(Logger.LogFileFullPath);
DmaEngine engine = new DmaEngine(connectionStrings);
- ISqlMigrationAssessmentModel contextualizedAssessmentResult = await engine.GetTargetAssessmentResultsList(System.Threading.CancellationToken.None);
+ ISqlMigrationAssessmentModel contextualizedAssessmentResult = await engine.GetTargetAssessmentResultsListWithCheck(System.Threading.CancellationToken.None);
+ engine.SaveAssessmentResultsToJson(contextualizedAssessmentResult, false);
var server = (contextualizedAssessmentResult.Servers.Count > 0)? ParseServerAssessmentInfo(contextualizedAssessmentResult.Servers[0], engine): null;
return new MigrationAssessmentResult()
{
@@ -246,25 +246,25 @@ namespace Microsoft.SqlTools.ServiceLayer.Migration
{
return assessmentResults.Select(r =>
{
- var check = engine.GetRuleMetadata(r.FeatureId, r.AppliesToMigrationTargetPlatform);
return new MigrationAssessmentInfo()
{
- CheckId = check.Id,
- Description = check.Description,
- DisplayName = check.DisplayName,
- HelpLink = check.HelpLink,
- Level = check.Level.ToString(),
- TargetName = r.AppliesToMigrationTargetPlatform.ToString(),
+ CheckId = r.Check.Id,
+ Description = r.Check.Description,
+ DisplayName = r.Check.DisplayName,
+ HelpLink = r.Check.HelpLink,
+ Level = r.Check.Level.ToString(),
+ TargetType = r.TargetType.ToString(),
DatabaseName = r.DatabaseName,
ServerName = r.ServerName,
- Tags = check.Tags.ToArray(),
+ Tags = r.Check.Tags.ToArray(),
RulesetName = Engine.Configuration.DefaultRuleset.Name,
RulesetVersion = Engine.Configuration.DefaultRuleset.Version.ToString(),
RuleId = r.FeatureId.ToString(),
Message = r.Message,
AppliesToMigrationTargetPlatform = r.AppliesToMigrationTargetPlatform.ToString(),
IssueCategory = r.IssueCategory.ToString(),
- ImpactedObjects = ParseImpactedObjects(r.ImpactedObjects)
+ ImpactedObjects = ParseImpactedObjects(r.ImpactedObjects),
+ DatabaseRestoreFails = r.DatabaseRestoreFails
};
}).ToArray();
}