< Back

Publish-DbUpScripts

Sat Jan 11, 2020 3:47 am

NAME Publish-DbUpScripts



SYNOPSIS

Publish the scripts to the Database





SYNTAX

Publish-DbUpScripts [-ConnectionString] <Object> [-DbUpPath] <Object> [-DbScripts] <Object> [<CommonParameters>]





DESCRIPTION

Using DbUp to publish the scripts to database. DbUp keeps track of which scripts it needs to run.





PARAMETERS

-ConnectionString <Object>

SQL Connection String pointing to a existing database



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DbUpPath <Object>

Path pointing to the location of the DbUp.dll binary



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DbScripts <Object>

Path pointing oo the location of the SQL scripts. The folder must contain SQL scripts



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



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



PS C:\\>Publish-DbUpScripts -ConnectionString "Server=(localdb)\\\\mssqllocaldb;Database=Test" -DbUpPath

"lib\\dbup.dll" -DbScripts "\\sql\\"



Publish the scripts in folder sql\\ to the specified connection string.











RELATED LINKS

DbUp docs: https://dbup.readthedocs.io/

Questions about this script: rick@chroomsoft.nl

Get-DbUp