# Upgrade

SQLWATCH has been developed in Visual Studio which is based on [Declarative Deployment Model](https://blogs.msdn.microsoft.com/gertd/2009/06/05/declarative-database-development/). This means that when database is deployed, the deployment mechanism works out what needs to be done in order to bring the target database to the desired version.

{% embed url="https://blogs.msdn.microsoft.com/gertd/2009/06/05/declarative-database-development/" %}

Summarising, to upgrade SQLWATCH database one simply follows the installation process. The only exception is when using SSMS, there is an explicit Upgrade Option in the database context:

![](https://560149426-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-LvRydsb9q37VnhBEQ1y%2F-LvRzsDbwi7pBMtvS6p7%2Fimage.png?alt=media\&token=df18d435-58d6-4691-af8b-fbe9a820f717)

## Challenges

Whilst declarative deployment makes the development very easy and deployment very reliable (either all or nothing) it can be a bottleneck when large schema changes are required. For example, migrating data type from UNIQUE IDENTIFIER to INTEGER would fail as such conversion is impossible. When this happens, manual migrations scripts are required which will be noted in the release notes.

