-
Notifications
You must be signed in to change notification settings - Fork 2
Arch SQL
A SQL Solution consists of
-
One or more SQL Server projects
Projects to be packaged and sent to the local NuGet server require the .nuget.config file controlling the packaging.
Projects that are to be deployed at build time require the .publish.xml file controlling the default deployment.
Files being included in the NuGet package are output to the project's Database folder, which is cleared by the build.
-
A dummy .NET Standard C# project for NuGet dependencies on other SQL solutions
-
PowerShell scripts to make the NuGet packaging work
-
The PackageTools folder
Utility scripts. They are organized as a .cmd script and a corresponding .ps1 script, or simply as a .ps1 script for the pre-build and post-build event handlers.
-
Bootstrap.cmd
Gets the latest PackageTools and PowerShell modules from the local NuGet server.
-
GetPackageContent.cmd
Gets the dependencies as specified in the Pkg dummy project from the local NuGet server. It copies the content folders and files to solution folder, specifically the Database dacpac packages and CLR libraries.
-
PublishDbProjects.cmd
Creates the NuGet packages for the databases, and pushes them to the local NuGet server. This requires the .nuget.config file in the project folder. The config file contains the major and minor version numbers of the NuGet package, and the build number is calculated from source control commits.
-
Invoke-PreBuildEvent.ps1
This script is executed by default before each database project is built. It clears the output folder.
-
Invoke-PostBuildEvent.ps1
This script is executed by default after each database project is built. It prepares the files to be packaged by NuGet.
-
-
The PowerShell folder
PS modules with functions used by the utility scripts
-
-
The Database folder
This contains the referenced .dacpac, CLR assemblies, and pre- and post-processing scripts for deploying the databases.