New-DlmDatabasePackage
Published 10 March 2016
New-DlmDatabasePackage
Packages the build artifacts of a validated project produced by the Invoke-DlmDatabaseSchemaValidation cmdlet.
Syntax
New-DlmDatabasePackage [-InputObject] <IProject> -PackageId <string> -PackageVersion <string> [-PackageDescription <string>] [-Documentation <SchemaDocumentation>] [<CommonParameters>]
|
Description
The New-DlmDatabasePackage cmdlet takes a validated project from the output of the Invoke-DlmDatabaseSchemaValidation cmdlet and creates a package containing it's build artifacts. It can also include the documentation for your database using the output of the New-DlmDatabaseDocumentation cmdlet.
You can use the Export-DlmDatabasePackage cmdlet to export the build artifacts as a NuGet package.
Parameters
-InputObject
<RedGate.DLMAutomation.Compare.Domain.Projects.IProject>
The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated project.
Aliases | None |
Required? | true |
Position? | 0 |
Default Value | None |
Accept Pipeline Input | true (ByValue) |
Accept Wildcard Characters | false |
-PackageId
<System.String>
The unique identifier for the package you are creating.
This mustn't contain more than 100 characters and must be a valid NuGet package identifier.
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
-PackageVersion
<System.String>
The version of the package. This must be in a valid NuGet version format (eg 3.2.1, 3.2.1-beta1).
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
-PackageDescription
<System.String>
The description of the package you are creating.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
-Documentation
<RedGate.DLMAutomation.Compare.Documentation.SchemaDocumentation>
The documentation object created by New-DlmDatabaseDocumentation to include in the database package.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
RedGate.DLMAutomation.Compare.Domain.Projects.IProject
The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated project.
Return values
The output type is the type of the objects that the cmdlet emits.
- RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact
Examples
---------- EXAMPLE 1 ----------
|
This example shows how to use the New-DlmDatabasePackage cmdlet to create a NuGet package from a validated SQL Source Control project.
First the Invoke-DlmDatabaseSchemaValidation cmdlet validates the database schema. Then the New-DlmDatabasePackage cmdlet creates the package. Finally the Export-DlmDatabasePackage cmdlet exports the package to file.
---------- EXAMPLE 2 ----------
|
This example shows how to use the New-DlmDatabasePackage cmdlet to create a package from a validated Redgate database project.
First the Invoke-DlmDatabaseSchemaValidation cmdlet validates the project. Then the New-DlmDatabasePackage cmdlet creates the package. Finally the Export-DlmDatabasePackage cmdlet exports the package to file.
---------- EXAMPLE 3 ----------
|
This example shows how to use the New-DlmDatabasePackage cmdlet to create a NuGet database package that also includes database documentation.
The documentation is created by the New-DlmDatabaseDocumentation cmdlet.