SQL Change Automation 4

Get-DependentProjectPaths

Retrieves all SQL Change Automation projects in dependency order within a folder.

Syntax

Get-DependentProjectPaths [-InputObject] <string> [<CommonParameters>]

Description

The Get-DependentProjectPaths cmdlet searches a folder for SQL Change Automation projects and returns their file paths in the order in which they ought to be built.

The folder specified should normally be a folder containing a solution file.

Dependency evaluation takes into account both dependencies defined between projects, and dependencies defined in the solution file.

Parameters

-InputObject <System.String>

The path to the folder containing database projects.

Aliases None
Required? true
Position? 0
Default Value None
Accept Pipeline Input true (ByValue)
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.

  • System.String

    The path to the folder containing database projects.

Return values

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

  • System.Collections.Generic.IReadOnlyCollection`1[[RedGate.Versioning.Automation.EngineFacade.Dependencies.OrderedProject, RedGate.Versioning.Automation.EngineFacade, Version=4.3.21020.23924, Culture=neutral, PublicKeyToken=7f465a1c156d4d57]]

Examples

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

$projectFolderPath = "C:\Work\project"
$projectFiles = $projectFolderPath | Get-DependentProjectPaths
$projectFiles | ForEach-Object {
    $projectFile = $_.FilePath
    $validatedProject = $projectFile | Invoke-DatabaseBuild
}

This example shows how to use the Get-DependentProjectPaths in conjunction with the Invoke-DatabaseBuild cmdlet to build multiple SQL Change Automation projects.

It is also possible to deploy projects to databases on a temporary server so that cross-database dependencies can be handled


Didn't find what you were looking for?