Per Bjurström
Jun 1, 2015
  7355
(9 votes)

Automatic database updates, Visual Studio 2015 and MVC 5

Automatic database updates

When we first starting shipping database updates in our NuGet-packages we said that we would like to get back to this area:

"We have discussed building automatic database schema updates into the products but based on the feedback we got early on it was more important to get the simple and controlled semi-automatic approach right first. Maybe based on your feedback and ideas we will get back to this area and offer more automation, let us know what you think."

The feedback has been very clear that there should be a built-in/official scenario for supporting automatic updates, especially when publishing to Azure the semi-automatic approach is too cumbersome. And for developers to keep track of database updates and importing them into custom database projects seems like an unnecessary step (unless you have other migration steps or an existing process for database updates that you want to integrate into).

We discussed many approaches to this but finally decided that the built-in support should be flipping a switch and it should just work. When EPiServer starts, if it detects an older database version and you enabled this feature, it will automatically update the database to the correct version. The scripts from 7.5 and up are embedded into the assembly. Based on early feedback from some of our fellow EMVP we have also added extension points to make it possible to for example backup the database, or provide custom validation logic, refer to Automatic schema updates for more details. Also see Henrik Fransas blog about customizing updates in Azure.

This feature will be a complement to the existing Update-EPiDatabase/Export-EPiUpdates cmdlets, these options are not going away. Automatic database updates are disabled by default, we want it to be a conscious decision to enable this feature.

We are also adding a new cmdlet Initialize-EPiDatabase that installs the current database schema into an empty database making it easier to switch to a new database in development.

The new database features will be supported by Commerce as well, automatic updates as of today and Initialize-EPiDatabase in another week or so.

Visual Studio 2015 support and MVC 5

We are also releasing an update of the Visual Studio extension. New EPiServer projects in this version will be based on MVC 5, which as been a popular request. An SDK article on how to upgrade an existing project to MVC 5 is also available, to keep the impact of this update to a minimum we have decided to continue to support MVC 4 in our NuGet-packages but we urge everyone to upgrade. We have also added support for the release candidate of Visual Studio 2015.

The update will be published today and should be visible as an update under ”Tools->Extensions and Updates” inside Visual Studio or on the gallery page. The NuGet-packages are available on nuget.episerver.com as usual.

Jun 01, 2015

Comments

Henrik Fransas
Henrik Fransas Jun 1, 2015 08:41 AM

Thanks for the link and great new about Visual Studio 2015 and MVC5!

Great work!

valdis
valdis Jun 1, 2015 10:03 AM

Great news!

Erik Nordin Wahlberg
Erik Nordin Wahlberg Jun 1, 2015 11:20 AM

Thumbs up!

K Khan
K Khan Jun 1, 2015 12:14 PM

Sounds Great!

Jun 2, 2015 08:10 AM

Initialize-EPiDatabase is a really nice addition. It's always cumbersome to set up new databases.

Jun 3, 2015 01:27 PM

Great news!

Jun 8, 2015 09:10 PM

Initialize-EPiDatabase is a real nice new feature!

Please login to comment.
Latest blogs
Optimizely’s Sustainability Journey: Creating a Future That’s Built to Last

  For me, sustainability isn’t just a company priority; it’s a personal one. I’m especially mindful of the role that content management plays at th...

Joey Moore | Dec 13, 2024

How I Fixed DLL Conflicts During EPiServer CMS Upgrade to .NET Framework 4.8.1

We had a CMS solution of EPiServer 11.26.0, which was built on .NET Framework 4.7.1. We needed to update the target framework from .NET Framework...

calimat | Dec 12, 2024

Custom form element view in Optimizely CMS 12

Do you want full control over the form element markup? Create your own views!

Tomas Hensrud Gulla | Dec 11, 2024 | Syndicated blog

How to Elevate Your Experimentation - Opticon workshop experience

As a non-expert in the field of experimentation, I’d like to share my feedback on the recent Opticon San Antonio workshop session titled "How to...

David Ortiz | Dec 11, 2024

Persisting a Strawberry Shake GraphQL Client for Optimizely's Content Graph

A recent CMS project used Strawberry Shake to generate an up-to-date C# GraphQL client at each build. But what happens to the build if the GraphQL...

Nicholas Sideras | Dec 11, 2024 | Syndicated blog

Opti ID with Secure Cookies And Third Party AddOns

Opti ID has revolutionised access to the Optimizely One suite and is now the preferred authentication method on all PAAS CMS websites that I build....

Mark Stott | Dec 9, 2024