The right way to do this with Visual Studio and SQL Server is to add the Database Project to your web application solution. There must be SQL files in the database design that can completely recreate the entire database on the new server along with all the necessary tables, procedure users, and roles.
Thus, they are also included in the source control for the rest of the code.
In the database project, there is a subcap Change , where I put the SQL files that apply any new changes or additions to the database for future versions.
SQL in the files must be written with the appropriate if-if blocks so that it can be safely run several times in an already updated database without errors.
, - SQL script , , ( SQL) .