SchemaCompareScriptService.GenerateUpdatePlan Method
Generates the complete update script when called by a DatabaseSchemaProvider.
Namespace: Microsoft.Data.Schema.Tools.Compare.Schema
Assembly: Microsoft.Data.Schema.Tools (in Microsoft.Data.Schema.Tools.dll)
Syntax
'Declaration
Public Overridable Sub GenerateUpdatePlan ( _
comparisonResult As ModelComparisonResult, _
source As DataSchemaModel, _
target As DataSchemaModel, _
excludedElements As HashSet(Of IModelElement), _
sourceModelProvider As ISchemaCompareModelProvider, _
targetModelProvider As ISchemaCompareModelProvider, _
configurationOptions As SchemaDeploymentOptions, _
<OutAttribute> ByRef plan As DeploymentPlan, _
<OutAttribute> ByRef errorsAndWarnings As ErrorManager _
)
public virtual void GenerateUpdatePlan(
ModelComparisonResult comparisonResult,
DataSchemaModel source,
DataSchemaModel target,
HashSet<IModelElement> excludedElements,
ISchemaCompareModelProvider sourceModelProvider,
ISchemaCompareModelProvider targetModelProvider,
SchemaDeploymentOptions configurationOptions,
out DeploymentPlan plan,
out ErrorManager errorsAndWarnings
)
public:
virtual void GenerateUpdatePlan(
ModelComparisonResult^ comparisonResult,
DataSchemaModel^ source,
DataSchemaModel^ target,
HashSet<IModelElement^>^ excludedElements,
ISchemaCompareModelProvider^ sourceModelProvider,
ISchemaCompareModelProvider^ targetModelProvider,
SchemaDeploymentOptions^ configurationOptions,
[OutAttribute] DeploymentPlan^% plan,
[OutAttribute] ErrorManager^% errorsAndWarnings
)
abstract GenerateUpdatePlan :
comparisonResult:ModelComparisonResult *
source:DataSchemaModel *
target:DataSchemaModel *
excludedElements:HashSet<IModelElement> *
sourceModelProvider:ISchemaCompareModelProvider *
targetModelProvider:ISchemaCompareModelProvider *
configurationOptions:SchemaDeploymentOptions *
plan:DeploymentPlan byref *
errorsAndWarnings:ErrorManager byref -> unit
override GenerateUpdatePlan :
comparisonResult:ModelComparisonResult *
source:DataSchemaModel *
target:DataSchemaModel *
excludedElements:HashSet<IModelElement> *
sourceModelProvider:ISchemaCompareModelProvider *
targetModelProvider:ISchemaCompareModelProvider *
configurationOptions:SchemaDeploymentOptions *
plan:DeploymentPlan byref *
errorsAndWarnings:ErrorManager byref -> unit
public function GenerateUpdatePlan(
comparisonResult : ModelComparisonResult,
source : DataSchemaModel,
target : DataSchemaModel,
excludedElements : HashSet<IModelElement>,
sourceModelProvider : ISchemaCompareModelProvider,
targetModelProvider : ISchemaCompareModelProvider,
configurationOptions : SchemaDeploymentOptions,
plan : DeploymentPlan,
errorsAndWarnings : ErrorManager
)
Parameters
- comparisonResult
Type: Microsoft.Data.Schema.SchemaModel.ModelComparisonResult
A ModelComparisonResult object.
- source
Type: Microsoft.Data.Schema.SchemaModel.DataSchemaModel
A DataSchemaModel object that represents the source model.
- target
Type: Microsoft.Data.Schema.SchemaModel.DataSchemaModel
A DataSchemaModel object that represents the target model.
- excludedElements
Type: System.Collections.Generic.HashSet<IModelElement>
A HashSet<T> of IModelElement objects that represent those elements to be excluded from the plan chosen by the user.
- sourceModelProvider
Type: Microsoft.Data.Schema.Tools.Compare.Schema.ISchemaCompareModelProvider
An ISchemaCompareModelProvider that represents the source provider.
- targetModelProvider
Type: Microsoft.Data.Schema.Tools.Compare.Schema.ISchemaCompareModelProvider
An ISchemaCompareModelProvider that represents the target provider.
- configurationOptions
Type: Microsoft.Data.Schema.Build.SchemaDeploymentOptions
A SchemaDeploymentOptions object that specifies the configuration to use to create the plan.
- plan
Type: Microsoft.Data.Schema.Build.DeploymentPlan%
(Output) A DeploymentPlan object.
- errorsAndWarnings
Type: Microsoft.Data.Schema.ErrorManager%
(Output) An ErrorManager object that contains any errors that occur during plan generation.
Remarks
This is the basic process of this method:
Call the OnStartGeneratePlan method.
If you want to create a deployment plan for a database:
Call the CreateDeploymentController method.
Call the OnBeforeGeneratePlan method.
Create the plan with the ISchemaDeploymentController.CreatePlan method of your derived deployment controller.
Call OnAfterGeneratePlan.
Verify the plan with the ISchemaDeploymentController.VerifyPlan method of your derived deployment controller.
Record any exceptions in the ErrorManager
Call the OnFinishGeneratePlan method.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
SchemaCompareScriptService Class