SchemaCompareScriptService.GenerateUpdatePlan 方法

DatabaseSchemaProvider 调用时生成完整的更新脚本。

命名空间:  Microsoft.Data.Schema.Tools.Compare.Schema
程序集:  Microsoft.Data.Schema.Tools(在 Microsoft.Data.Schema.Tools.dll 中)

语法

声明
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
)

参数

备注

这是此方法的基本过程:

  1. 调用 OnStartGeneratePlan 方法。

  2. 如果要为数据库创建部署计划:

    1. 调用 CreateDeploymentController 方法。

    2. 调用 OnBeforeGeneratePlan 方法。

    3. 使用派生部署控制器的 ISchemaDeploymentController.CreatePlan 方法创建计划。

    4. 调用 OnAfterGeneratePlan

    5. 使用派生部署控制器的 ISchemaDeploymentController.VerifyPlan 方法验证计划。

    6. ErrorManager 中记录任何异常

  3. 调用 OnFinishGeneratePlan 方法。

.NET Framework 安全性

请参见

参考

SchemaCompareScriptService 类

Microsoft.Data.Schema.Tools.Compare.Schema 命名空间

ModelComparisonResult

DataSchemaModel

IModelElement

ISchemaCompareModelProvider

SchemaDeploymentOptions

DeploymentPlan

ErrorManager