Fix restore service to set target db same as source db (#479)

* fix restore service to change target db

* add overwriteTargetDb param

* update comment
This commit is contained in:
Kate Shin
2017-10-06 11:31:10 -07:00
committed by GitHub
parent f09b9f4c30
commit 2c4f2cf6b8
7 changed files with 29 additions and 13 deletions

View File

@@ -49,7 +49,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.DisasterRecovery
public List<string> SourceDbNames { get; set; }
public bool CanChangeTargetDatabase { get; set; }
public bool OverwriteTargetDatabase { get; set; }
public string DefaultTargetDbName { get; set; }

View File

@@ -336,7 +336,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.DisasterRecovery
restoreDataObject.SourceDatabaseName = optionValues.GetOptionValue<string>(RestoreOptionsHelper.SourceDatabaseName);
restoreDataObject.TargetDatabaseName = optionValues.GetOptionValue<string>(RestoreOptionsHelper.TargetDatabaseName);
restoreDataObject.TailLogWithNoRecovery = optionValues.GetOptionValue<bool>("TailLogWithNoRecovery");
restoreDataObject.CanChangeTargetDatabase = optionValues.GetOptionValue<bool>("CanChangeTargetDatabase");
restoreDataObject.OverwriteTargetDatabase = optionValues.GetOptionValue<bool>("CanChangeTargetDatabase");
restoreDataObject.DefaultSourceDbName = optionValues.GetOptionValue<string>("DefaultSourceDbName");
restoreDataObject.SourceDbNames = optionValues.GetOptionValue<List<string>>("SourceDbNames");
restoreDataObject.DefaultTargetDbName = optionValues.GetOptionValue<string>("DefaultTargetDbName");