Peter Bridger
Peter Bridger

Reputation: 9323

Using Octopus Deploy with EPiServer to handle database upgrades

Since EPiServer 7 upgrading to a newer version has involved:

  1. Updating all EPiServer.* NuGet packages
  2. Running PM > Update-EPiServer - to upgrade the local database
  3. Running PM > Export-EPiServer - to produce a set of database upgrade script files that can be run on other servers.

However if only the upgraded EPiServer solution is built and deployed by Octopus Deploy, the database will not be upgraded meaning the site will not run.

Currently I run the EPiServerPackage manually on a server in each of our environments after a deployment.

I'm trying to decide on the cleanest way to include the /EPiUpdatePackage folder and contents running the Export-EPiServer command produces so that it will:

Upvotes: 1

Views: 140

Answers (1)

Peter Bridger
Peter Bridger

Reputation: 9323

As per Eric Herlitz suggestion, I have simply used the <episerver.framework updateDatabaseSchema="true"> in the web.config transforms for the environments I wish to have the database automatically upgraded on.

I'm unsure it this will present a problem if the SQL connection string user does not have the required level of permissions. However in my case, this is working correctly.

Upvotes: 1

Related Questions