SQL Release

Import-DlmDatabasePackage

Import-DlmDatabasePackage

Imports a NuGet database package to an instance of a DatabasePackage object.

Syntax

Import-DlmDatabasePackage [-Path] <string> [<CommonParameters>]

Description

The Import-DlmDatabasePackage cmdlet uses a NuGet database package to create a DatabasePackage object that can be used as the input for other cmdlets such as Publish-DlmDatabasePackage.

Parameters

-Path <System.String>

The path to NuGet database package file (eg 'c:\packages\MyDatabase.1.0.0.nupkg').

Aliases None
Required?true
Position?0
Default Value None
Accept Pipeline Inputtrue (ByValue)
Accept Wildcard Charactersfalse

<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.

  • System.String

    The path to NuGet database package file (eg 'c:\packages\MyDatabase.1.0.0.nupkg').

Return values

The output type is the type of the objects that the cmdlet emits.

  • RedGate.SQLRelease.Compare.Packaging.DatabasePackage

Examples

---------- EXAMPLE 1 ----------

$databasePackagePath = "c:\packages\MyDatabase.1.0.0.nupkg"
$databasePackage = $databasePackagePath | Import-DlmDatabasePackage
$databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89

This example shows how to use the Import-DlmDatabasePackage cmdlet to create a DatabasePackage object from a database package file. The Publish-DlmDatabasePackage cmdlet then publishes the output object to a NuGet feed.


Didn't find what you were looking for?