Script print of ms project file

broken image
broken image

Right-click on the Scripts folder and select Add. In Solution Explorer, expand your database project to display the Scripts folder.

broken image
broken image

To add and modify a pre- or post-deployment script You can add a statement such as the following to your post-deployment script: If the table is not empty, you must clear the existing data or specify that you want to always re-create the database before you deploy it. Before you insert the data, you can test whether the table already contains data. You can insert reference data that must exist in a table in a post-deployment script. For example:Ī pre-deployment script can copy data from a table that is being changed into a temporary table before re-formatting and applying the data to the changed table in a post-deployment script, These scripts can be used for many purposes. A project can have only one pre-deployment and one post-deployment script. The pre-deployment script will not be executed when updating targets from schema compare results in Visual Studio. Pre-deployment and post-deployment scripts execute Transact-SQL statements before and after the main deployment script, which is generated from the database project.

broken image