This is a follow-on post from, How The Episerver 'Installation' And 'Update' Powershell Functions Work Under Da Hood that will allow you to run the Episerver SQL update scripts from your build server.
Episerver provides two useful PowerShell functions that you can call within your Nuget Package Management Console that will install all the tables and stored procedures required by Episerver in order to create a fresh database. If you try and run these scripts manually though, SQL will moan and fail. In today's guide, I'll show you how you can get these scripts to work!
What Is Epideploy.exe?
You can probably use Episerver for a while before you bump into epideploy. The 'epideploy.exe' tool comes as part of the Epi Framework. When you add the Episerver.Core Nuget package into your solution, if you look within your Epi framework packages folder, as seen below, you should be able to find it within the 'tools' directory:
What Is Export-EPiUpdates?
Export-EPiUpdates is a PowerShell function provided by the Episerver to help you upgrade your SQL database when you upgrade Episerver. Export-EpiUpdates will export all the SQL scripts required to upgrade a database to the latest version for the CMS, Episerver Find and Episerver commerce. Export-API updates will create a new folder with 'epideploy.exe', a batch file and all the scripts required:
To upgrade your database, you simply call the batch file passing in the path to your website, sort of something like this if you're doing it in C#:
Possible Build Process Improvement Tip
Upgrading your Epi-database is pretty simple. In a perfect world, then maybe the upgrade path could create one giant superscript you could simply run against SQL but this process is much better than the majority of CMS platforms out there. In the next tutorial I'll go over a small deployment application I created that fully automates this process, enjoy!