SchemaDeployment Class

Represents the database schema deployment engine.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.Build.SchemaDeployment

Namespace:  Microsoft.Data.Schema.Build
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Public Class SchemaDeployment _
    Implements IDisposable
public class SchemaDeployment : IDisposable
public ref class SchemaDeployment : IDisposable
type SchemaDeployment =  
    class
        interface IDisposable
    end
public class SchemaDeployment implements IDisposable

The SchemaDeployment type exposes the following members.

Constructors

  Name Description
Public method SchemaDeployment This constructor is reserved for internal use and is not intended to be used in your code. You can create an instance of SchemaDeployment by using the SchemaDeploymentConstructor of the database schema provider. Initializes a new instance of the SchemaDeployment class.

Top

Properties

  Name Description
Public property ComparisonResult Gets the result of comparing the source and the target database models.
Public property ContributorArguments Gets a list of command line arguments and their values as set by the user in Visual Studio Application Lifecycle Management (ALM).
Public property ContributorConfiguration Gets the list of files that contain contributor configurations.
Protected property DatabaseSchemaProvider Gets the DatabaseSchemaProvider for both the source database and the target database.
Public property ErrorManager Gets the ErrorManager object.
Public property IsDeployToDatabase
Public property IsDeployToScript
Public property Options Gets the deployment options.
Protected property OriginalSourceDatabaseSchemaProvider Gets the original DatabaseSchemaProvider for the source database.
Public property Plan Gets the deployment plan.
Public property PlanExecutors Gets a list of DeploymentPlanExecutor objects that will be used during deployment.
Protected property PlanGenerator Gets the DeploymentPlanGenerator object.
Public property PlanModifiers Gets a list of DeploymentPlanModifier objects.
Public property Source Gets the DataSchemaModel for the source database.
Public property Target Gets the DataSchemaModel for the target database.

Top

Methods

  Name Description
Public method Configure Configures a deployment by using the provided deployment manifest and directory information.
Public method CreateController Creates and returns an ISchemaDeploymentController object.
Public method Dispose() Releases resources.
Protected method Dispose(Boolean) Releases resources.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method Execute Executes the deployment plan by using all previously set properties, options, and parameters.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method LoadDeploymentConfiguration Loads the configuration file and calls the OnLoadDeploymentConfiguration method.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnAfterPreparePlan Called after the deployment plan has been prepared to allow derived classes to perform additional processing for a custom DatabaseSchemaProvider.
Protected method OnBeforePreparePlan Called before preparing the deployment plan is prepared. This method allows derived classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnBuildConnectionString Called when building the connection string is built. This method allows derived classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnCancel Called when deployment execution has been canceled.
Protected method OnClearPreviousOutputs Override this method in database schema provider implementations if you have to remove additional outputs from a previous deployment.
Protected method OnConfigure Called when a configuration is applied. This method allows derived classes to do additional processing for a custom DatabaseSchemaProvider when a Microsoft.Build.Evaluation.Project is used.
Protected method OnConfigureComparerConfiguration Called when applying model comparer configuration to allow derived classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnCreateDatabaseModifier Called to allow derived classes to do additional processing and possibly to use a custom DeploymentPlanExecutor to execute the deployment plan for a custom DatabaseSchemaProvider.
Protected method OnCreateDeploymentScriptGenerator Called to create a DeploymentScriptGenerator.
Protected method OnCreateNewDatabaseModel Called when creating the target database model to allow derived classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnDatabaseExists When implemented in a derived class, verifies that the specified database exists.
Protected method OnImportTargetModel Called during deployment execution when preparing the model for deployment and the CreateNewDatabase option is false.
Protected method OnInitializeConstructor(ModelComparerConstructor) Called when a ModelComparerConstructor is initialized to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnInitializeConstructor(ReverseEngineerConstructor) Called when a ReverseEngineerConstructor is initialized to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnInitializeConstructor(DataSchemaModelHeader, DatabaseSchemaProvider, DataSchemaModelConstructor)
Protected method OnLoadDeploymentConfiguration Called by the LoadDeploymentConfiguration method to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnLoadTargetModelModifiers Called when loading model modifiers for the target database model to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnVerifyModels Called during deployment execution after the schema models have been prepared for deployment to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnVerifyPlan Called during deployment execution after the deployment plan has been created to allow custom classes to do additional processing for a custom DatabaseSchemaProvider.
Protected method OnVerifyTargetConnection Called during initialization to verify the connection string for the target database.
Public method SetDeployToDatabase Call this method after a manifest is loaded to specify whether the deployment plan is deployed to the target database.
Public method SetDeployToScript Call this method after you load a deployment manifest to override whether a deployment script is generated. If the first parameter is set to true, any parent directory that is specified in scriptPath must exist.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event ContributorMessage Occurs when a DeploymentContributor, that is, DeploymentPlanContributor or RefactoringDeploymentContributor, returns a message.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Data.Schema.Build Namespace

Other Resources

Extending the Database Features of Visual Studio