In this setup the version control system holds the "master"-version of the system. The files should be versioned in such a way that new clones of the system can be created by checking out the files and using DbSync.exe -SetupDatabase.
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 the deploy script has to be added manually.
The setting "Development environment" should be set to "Local computer" when using local development. When enabled, DbSync.exe -FromDatabase will create files in the "DatabaseScripts"-folder for deploy scripts. These scripts should be checked in and will be executed in other developers' databases and the Central development system when they run DbSync.exe -ToDatabase. The exact flow depends on the version control system. See Version control specific info.
It is recommended to review database model change scripts before they are pushed to the main branch, since making changes will either create unoptimized scripts or involves contacting all other developers.
These changes include changes that are not changed to the database model. That is Softadmin® object (for example menu items) and SQL objects (for example stored procedures), files on disk etc.
To push changes the developer should:
DbSync.exe -FromDatabaseAn external tool compatible with the version control system should be used for code review.
To get other peoples' changes:
DbSync.exe -ToDatabase when updating the current branch or DbSync.exe -SetupDatabase when setting up a system from a new branch.The purpose of this step is to move code from the Version Control System to the Central development system.
How this is triggered is up to each project, and is dependent on project needs and version control system. This may be triggered either automatically or manually.
Since the requirements vary and Softadmin® is no bound to a single version control system there is no single tool to handle this. Usually each project modifies their own scripts for their specific needs, usually bundled as a Powershell script. The tool DbSync does however help this process.
The script should:
DbSync.exe -ToDatabaseFrom the Central development system the normal deploy flow i used.
To set up a new branch or a new database.
DbSync.exe -SetupDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1 90000 300000
After normal development only module 1 need to be checked in.
DbSync.exe -FromDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1
After an upgrade all modules need to be checked in.
DbSync.exe -FromDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1 90000 300000
After normal development only module 1 need to be checked in.
DbSync.exe -ToDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1
After an upgrade all modules need to be checked in.
DbSync.exe -ToDatabase -Database ExampleDatabase -Server localhost\SqlExpress -ModuleIds 1 90000 300000
Typically done in Subversion and similar version control systems.
Typically done in GIT and similar version control systems.