Manage DbSchema Design Model in GIT

DbSchema is saving the database structure ( the table, columns, indexes and foreign keys definition ) into the design model file. The design model file is using the XML format and can be open using any text editor. Saving the model file into GIT you can design the schema in team.

DbSchema has its own dialog for working with GIT, which can :

  • Clone, Pull, Commit and Push changes
  • Show the different revisions
  • Compare different revisions of the same model file and generate migration scripts.
  • Help to solve conflicts by push or pull.
  • Audit the changes to a certain table.

The GIT Dialog

The dialog is available under the 'Model' menu in DbSchema.

DbSchema GIT Dialog
The dialog shows the GIT revisions for the current model file. This assumes the current model is saved (as file) in the GIT repository. There you can:
  • Clone an existing repository
  • Commit and push repository changes
  • Pull last repository changes
Selecting two revisions you can compare the same model two versions.
Compare the design model from two revisions
Selecting two ore more revisions, you can choose to view the Change Audit. This shows all the modifications, the author and the change time. Use this to easy find out in which revisions has been modified a certain table or column.
Audit database schema changes

Authentication

You can authenticate in GIT using username and password. For GITHUB the password is a token which can be generated in GitHub.

If you use the private key, and you get any issue related to the key, please convert the key to classic OpenSSH format using:

ssh-keygen -p -f <privateKeyFile> -m pem -P passphrase -N passphrase