Transfer changes from Dev DB to the production database

Let's say I have a website and a database for this site, hosted locally on my computer (for development) and another hosted in the database (for production) ... i.e. I make changes to dev db first, and then I make changes to the prod database.

What is the best way to transfer the changes I made in the local database to the hosted database?

If it matters, I use MS Sql Server (2008)

+2
source share
5 answers

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) .

+3

(Ruby on) Rails, "", , . ( ), , , .

​​ dev (.Net?), , , , .

, . , - . .

+1

, , / . ( .) . .

, , , .

dev.

/ . . http://www.red-gate.com/ 2 . Brian

+1

, . Red Gate SQL Compare . QA, , . QA, .

+1

, . . , , - .

RedGate DB . , - .

- . Agile DB Recreation/Import/Reverse/Export tool .

: DEV DB. DB RIRE DB (, , proc ..) XML. XML , .

- DB RIRE , XML .

, , .

0

Source: https://habr.com/ru/post/1754576/


All Articles