Deploy database changes to the Cloud

Your Sitefinity Cloud website is configured in a Continuous Delivery (CD) setup according to best practices for web development. In a CD setup, the state of the application is part of the deployment package. This way, when you make a deployment, the package contains the changes and modifies the environment automatically. When your development team works on your website in the local (Development) environment, this usually results in code and database changes that must be promoted to the next environment. This article provides information about the process for deploying database changes form your development environment to Staging and Production environments. For information about deploying code changes, see Deploy code changes.

To promote database changes of your Sitefinity Cloud website from Development to the Staging environment, you must leverage the Export for deployment option of the Export/Import mechanisms of Sitefinity CMS. For more information, see Export and deploy database changes.

NOTE: Export for deployment only exports the database structure changes. It cannot be used for content promotion mechanism. Instead, the official recommendation is to author and manage content on the Production environment, while using Export for deployment for promoting your database structure changes. 

The following diagram demonstrates your Sitefinity Cloud website Continuous Delivery setup and the role of Export for deployment in it:

Export for deployment

Use Export for deployment to facilitate collaboration on your Dev environment

The Export for deployment mechanism enables you to export all database changes in a specific format on the file system. The exported files can then be added to your solution and checked in under source control.

NOTE: The Deployment folder is not included in the Visual Studio project by default. To promote the changes to the next environment, you must explicitly include the folder in your project. 

Every time Sitefinity starts, it checks the ~/App_Data/Sitefinity/Deployment folder and applies any changes detected there. This way, all members of your development team can collaborate by checking in their database structure changes, and making sure they are all working with the same structure locally.

Promote database changes to Staging environment

When you have used Export for deployment to prepare the database structure export files and checked them in under source control, once you are ready to promote your changes to the Staging environment, they automatically become part of the package. On Staging, once Sitefinity starts it applies the detected changes and modifies the database structure accordingly. This way, the changes that have been living originally on the Development environment file system, have become part of the Staging database.

Promote database changes to Live environment

When you are ready to promote your changes to the Live environment, you promote the same package that you have promoted to Staging. In a similar fashion, when Sitefinity starts it applies the database structure changes that are part of the package to the Live website database.


Was this article helpful?

Next article

Azure Key Vault