Shared server with version control
In this setup the Development system holds the "master"-version of the system. This means all developers work on the same working copy. But the source code is also checked in. However non versioned code may be deployed.
The following computer setup is needed.
Database model changes can be made through Database Designer or through external tools like SSMS. If changes are made through external tools (for example SSMS) the deploy script has to be added manually.
The changes are made directly to the Development system. Through the admin-interface or SSMS.
To push changes to the version control system the developer should:
DbSync.exe -SqlModulesFromDatabase or DbSync.exe -FromDatabase from the central database to their local checkout of the repository. See DbSync.To version table content in addition to versioning SQL objects. Use the -FromDatabase flag instead of -SqlModulesFromDatabase.
This requires the the file in this folderDatabase/Tables/CustomTables.xml. Download an example of CustomTables.xml.
An external tool compatible with the version control system should be used for code review.
All developers are working in the same copy of the system, meaning everyone will instantly get all changes. This also means one developer may break another developers code, or they might overwrite each others changes. Developers must coordinate so two developers does not work on the same objects.
The normal deploy flow i used from the Development system. All developers need to coordinate so there are nothing in half-state in the development system at the time of deploy.
DbSync is usually called using a cmd file. Exacly what parameters are used is specific to the project. These are some common setups:
Only SQL objects
DbSync.exe -SqlModulesFromDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1 -NoStubs -IgnoreChangesByOtherUsers
SQL objects and table content
DbSync.exe -FromDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1 -NoStubs -IgnoreChangesByOtherUsers
See Basic version control using DbSync for more info.