Share via


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

Remarks

This is the basic process of this method:

  1. Call the OnStartGeneratePlan method.

  2. If you want to create a deployment plan for a database:

    1. Call the CreateDeploymentController method.

    2. Call the OnBeforeGeneratePlan method.

    3. Create the plan with the ISchemaDeploymentController.CreatePlan method of your derived deployment controller.

    4. Call OnAfterGeneratePlan.

    5. Verify the plan with the ISchemaDeploymentController.VerifyPlan method of your derived deployment controller.

    6. Record any exceptions in the ErrorManager

  3. Call the OnFinishGeneratePlan method.

.NET Framework Security

See Also

Reference

SchemaCompareScriptService Class

Microsoft.Data.Schema.Tools.Compare.Schema Namespace

ModelComparisonResult

DataSchemaModel

IModelElement

ISchemaCompareModelProvider

SchemaDeploymentOptions

DeploymentPlan

ErrorManager