Test-DatabaseHasScriptsToApply
Description
Runs the dotnet tool "EdFi.Db.Deploy" with WhatIf verb to determine whether there are migration scripts on the
filesystem that haven't been applied to an Ed-Fi database
Syntax
Test-DatabaseHasScriptsToApply [[-Engine] <String>] [[-Database] <String>] [-ConnectionString] <String> [-FilePaths] <String[]> [[-Features] <String[]>] [[-DatabaseTimeoutInSeconds] <Int32>] [<CommonParameters>]
Parameters
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
-Engine | The database engine provider, either "SQLServer" or "PostgreSQL" | false | false | SQLServer | |
-Database | The database type to be deployed. | false | false | EdFi | |
-ConnectionString | The full connection string to the database server. | true | false | ||
-FilePaths | An array of paths to database script diretories. It may contain paths to extension script directories. | true | false | ||
-Features | An optional array of features (aka "sub types") to deploy. | false | false | @() | |
-DatabaseTimeoutInSeconds | false | false | 0 |
Examples
Test with the ODS database, with GrandBend and Sample extensions and with
Change Queries enabled, to the "EdFi_Ods" database on a local SQL
Server instance:
$splat = @{
Engine = "SQLServer";
Database = "EdFi";
ConnectionString = "server=localhost;database=EdFi_Ods;integrated security=sspi";
FilePaths = @(
"C:\\Source\\3.x
Ed-Fi-ODS",
"C:\\Source\\3.x
Ed-Fi-ODS-Implementation",
"C:\\Source\\3.x\\Ed-Fi-ODS-Implementation\\Application
EdFi.Ods.Extensions.GrandBend",
"C:\\Source\\3.x\\Ed-Fi-ODS-Implementation\\Application
EdFi.Ods.Extensions.Sample"
);
Features = @(
"Changes"
)
}
Test-DatabaseHasScriptsToApply @splat