Skip to content

Create NuGet DB Solution

JamieO53 edited this page Mar 9, 2018 · 4 revisions

Return to Home page

Developer Setup

Creating a new NuGet database solution

If not already done, the database solution tool needs to be installed. The installation folder will be referred to as the tools folder.

Use Database Solution Tool

Use the database solution tool to create the new solution.

Migrate an existing database

An instance of the existing database is required, ideally with just configuration data such as predefined code tables.

The first step is to import the database objects into the new SQL Server project.

In the process Visual Studio will produce errors and warnings for the imported scripts. Any legacy database will have unused objects that contain these errors. A common example is a stored procedure using tables that no longer exist. The procedure is quite useless, as executing it would cause a crash. It cannot be in use anywhere.

This is an opportunity to clean up the database and eliminate any unused objects. Care is needed because the faulty code could be conditional, and the condition is rarely met. Removing the procedure would then be wrong.

Many groups adopt the policy of no errors or warning in their code. Specific warnings such as case differences can be suppressed globally in the project. Others, such as missing objects, may be expected. Such warnings can be suppressed on specific objects.

Clone this wiki locally